Hey I am new to RoR. I used Dan Benjamins install. Installing MySQL and RoR using the terminal. I made two files. One the controller, called say_controller and than I made a views file, called hello.html.erb Instead of getting "Hello, world!" I get SyntaxError in SayController#hello /Users/arongrinshtein/agile/demo/app/controllers/say_controller.rb:3: syntax error, unexpected $end, expecting kEND Any ideas? I am keen to get coding. Thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Jan 23, 10:06 am, agrinshtein <Agrinsht...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Instead of getting "Hello, world!" I get > > SyntaxError in SayController#hello > > /Users/arongrinshtein/agile/demo/app/controllers/say_controller.rb:3: > syntax error, unexpected $end, expecting kEND > > Any ideas?It probably is just a syntax error like a stray or missing ''end''. Hard to say without seeing the controller code though. Fred --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Here is the controller code. class SayController < ApplicationController def hello end I just copied and pasted from "Agile Web development with rails." On Jan 23, 1:13 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Jan 23, 10:06 am, agrinshtein <Agrinsht...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Instead of getting "Hello, world!" I get > > > SyntaxError in SayController#hello > > > /Users/arongrinshtein/agile/demo/app/controllers/say_controller.rb:3: > > syntax error, unexpected $end, expecting kEND > > > Any ideas? > > It probably is just a syntax error like a stray or missing ''end''. Hard > to say without seeing the controller code though. > > Fred--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
put another end after def hello On Jan 24, 12:19 am, agrinshtein <Agrinsht...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Here is the controller code. > > class SayController < ApplicationController > def hello > end > > I just copied and pasted from "Agile Web development with rails." > > On Jan 23, 1:13 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > > On Jan 23, 10:06 am, agrinshtein <Agrinsht...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Instead of getting "Hello, world!" I get > > > > SyntaxError in SayController#hello > > > > /Users/arongrinshtein/agile/demo/app/controllers/say_controller.rb:3: > > > syntax error, unexpected $end, expecting kEND > > > > Any ideas? > > > It probably is just a syntax error like a stray or missing ''end''. Hard > > to say without seeing the controller code though. > > > Fred--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Did that. Now I get another error. MissingSourceFile in SayController#hello no such file to load -- sqlite3 It is possible that is the case because I set RoR up with MySQL, following Dan Benjamins tutorials. http://danbenjamin.com/articles/2008/02/ruby-rails-leopard http://danbenjamin.com/articles/2007/11/installing-mysql-on-mac-os-x Any ideas how to connect it with MySQL or should I connect it with SQLite. Not that I know the difference. Thanks for your help guys. On Jan 23, 3:20 pm, robokos <zol...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> put another end after def hello > > On Jan 24, 12:19 am, agrinshtein <Agrinsht...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Here is the controller code. > > > class SayController < ApplicationController > > def hello > > end > > > I just copied and pasted from "Agile Web development with rails." > > > On Jan 23, 1:13 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > wrote: > > > > On Jan 23, 10:06 am, agrinshtein <Agrinsht...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Instead of getting "Hello, world!" I get > > > > > SyntaxError in SayController#hello > > > > > /Users/arongrinshtein/agile/demo/app/controllers/say_controller.rb:3: > > > > syntax error, unexpected $end, expecting kEND > > > > > Any ideas? > > > > It probably is just a syntax error like a stray or missing ''end''. Hard > > > to say without seeing the controller code though. > > > > Fred--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
you may not have the sqlite3 gem installed. sudo gem install sqlite3-ruby also make sure you run your migrations rake db:migrate then you should be good to go. On Jan 24, 12:56 am, agrinshtein <Agrinsht...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Did that. Now I get another error. > > MissingSourceFile in SayController#hello > > no such file to load -- sqlite3 > > It is possible that is the case because I set RoR up with MySQL, > following Dan Benjamins tutorials.http://danbenjamin.com/articles/2008/02/ruby-rails-leopardhttp://danbenjamin.com/articles/2007/11/installing-mysql-on-mac-os-x > > Any ideas how to connect it with MySQL or should I connect it with > SQLite. Not that I know the difference. > > Thanks for your help guys. > > On Jan 23, 3:20 pm, robokos <zol...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > put another end after def hello > > > On Jan 24, 12:19 am, agrinshtein <Agrinsht...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Here is the controller code. > > > > class SayController < ApplicationController > > > def hello > > > end > > > > I just copied and pasted from "Agile Web development with rails." > > > > On Jan 23, 1:13 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > > wrote: > > > > > On Jan 23, 10:06 am, agrinshtein <Agrinsht...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > Instead of getting "Hello, world!" I get > > > > > > SyntaxError in SayController#hello > > > > > > /Users/arongrinshtein/agile/demo/app/controllers/say_controller.rb:3: > > > > > syntax error, unexpected $end, expecting kEND > > > > > > Any ideas? > > > > > It probably is just a syntax error like a stray or missing ''end''. Hard > > > > to say without seeing the controller code though. > > > > > Fred--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
THANKS GUYS! It is working. The only thing is, is there any way to configure it with MySQL. Is there any reason to do that? On Jan 23, 4:10 pm, robokos <zol...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> you may not have the sqlite3 gem installed. > > sudo gem install sqlite3-ruby > > also make sure you run your migrations > > rake db:migrate > > then you should be good to go. > > On Jan 24, 12:56 am, agrinshtein <Agrinsht...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Did that. Now I get another error. > > > MissingSourceFile in SayController#hello > > > no such file to load -- sqlite3 > > > It is possible that is the case because I set RoR up with MySQL, > > following Dan Benjamins tutorials.http://danbenjamin.com/articles/2008/02/ruby-rails-leopardhttp://danb... > > > Any ideas how to connect it with MySQL or should I connect it with > > SQLite. Not that I know the difference. > > > Thanks for your help guys. > > > On Jan 23, 3:20 pm, robokos <zol...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > put another end after def hello > > > > On Jan 24, 12:19 am, agrinshtein <Agrinsht...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Here is the controller code. > > > > > class SayController < ApplicationController > > > > def hello > > > > end > > > > > I just copied and pasted from "Agile Web development with rails." > > > > > On Jan 23, 1:13 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > > > wrote: > > > > > > On Jan 23, 10:06 am, agrinshtein <Agrinsht...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > Instead of getting "Hello, world!" I get > > > > > > > SyntaxError in SayController#hello > > > > > > > /Users/arongrinshtein/agile/demo/app/controllers/say_controller.rb:3: > > > > > > syntax error, unexpected $end, expecting kEND > > > > > > > Any ideas? > > > > > > It probably is just a syntax error like a stray or missing ''end''. Hard > > > > > to say without seeing the controller code though. > > > > > > Fred--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
The default database for Rails apps was changed from Mysql to Sqlite. Thankfully, it''s quite easy to switch your DB: If you are starting a Rails project from scratch, run your rails command like so: rails -d mysql myapp If you want to switch an exisiting project from Sqlite to Mysql: set adapter to "mysql" in your config/database.yml file. Hope to help, Jason Arora On Jan 23, 7:23 am, agrinshtein <Agrinsht...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> THANKS GUYS! > > It is working. The only thing is, is there any way to configure it > with MySQL. Is there any reason to do that? > > On Jan 23, 4:10 pm, robokos <zol...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > you may not have the sqlite3 gem installed. > > > sudo gem install sqlite3-ruby > > > also make sure you run your migrations > > > rake db:migrate > > > then you should be good to go. > > > On Jan 24, 12:56 am, agrinshtein <Agrinsht...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Did that. Now I get another error. > > > > MissingSourceFile in SayController#hello > > > > no such file to load -- sqlite3 > > > > It is possible that is the case because I set RoR up with MySQL, > > > following Dan Benjamins tutorials.http://danbenjamin.com/articles/2008/02/ruby-rails-leopardhttp://danb... > > > > Any ideas how to connect it with MySQL or should I connect it with > > > SQLite. Not that I know the difference. > > > > Thanks for your help guys. > > > > On Jan 23, 3:20 pm, robokos <zol...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > put another end after def hello > > > > > On Jan 24, 12:19 am, agrinshtein <Agrinsht...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > Here is the controller code. > > > > > > class SayController < ApplicationController > > > > > def hello > > > > > end > > > > > > I just copied and pasted from "Agile Web development with rails." > > > > > > On Jan 23, 1:13 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8@public.gmane.orgm> > > > > > wrote: > > > > > > > On Jan 23, 10:06 am, agrinshtein <Agrinsht...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > Instead of getting "Hello, world!" I get > > > > > > > > SyntaxError in SayController#hello > > > > > > > > /Users/arongrinshtein/agile/demo/app/controllers/say_controller.rb:3: > > > > > > > syntax error, unexpected $end, expecting kEND > > > > > > > > Any ideas? > > > > > > > It probably is just a syntax error like a stray or missing ''end''. Hard > > > > > > to say without seeing the controller code though. > > > > > > > Fred--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---