Sntax error after generating project

21 views
Skip to first unread message

thad

unread,
Jan 9, 2014, 7:08:22 AM1/9/14
to rubyonra...@googlegroups.com
I generated the project with the command rails new reservation_maker -d mysql and after it was finished generating I got 4 errors. All were syntax error, unexpected ':' .The first was in the gemfile on the line gem 'sdoc', require: false. The second in application_controller.rb on the line protect_from_forgery with: :exception. The third was in session_store.rb on the line ReservationMaker::Application.config.session_store :cookie_store, key: '_reservation_maker_session'. The last in wrap_parameters.rb on the line wrap_parameters format: [:json] if respond_to?(:wrap_parameters). I looked back at a previous rails project and it has the same setup and lines of code as this one but none of the errors. I replaced the : with => and it cleared the errors but when I try to run the server it tells me that there is an error in the gem file. Also I'm using ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-linux] and rails 4.0.2. So, how can I fix this?

thad

unread,
Jan 9, 2014, 12:04:17 PM1/9/14
to rubyonra...@googlegroups.com
I figured out how to resolve the problem. I had to go back to the old hash notation. But this shouldn't a problem since I'm using the most recent versions of ruby and rails, right?

Frederick Cheung

unread,
Jan 9, 2014, 12:49:23 PM1/9/14
to rubyonra...@googlegroups.com, xav1...@gmail.com


On Thursday, January 9, 2014 5:04:17 PM UTC, thad wrote:
I figured out how to resolve the problem. I had to go back to the old hash notation. But this shouldn't a problem since I'm using the most recent versions of ruby and rails, right?

My guess would be that you actually have 2 versions of ruby installed and aren't using the one you think you are.

Fred

and...@benjamin.dk

unread,
Jan 10, 2014, 7:03:03 AM1/10/14
to rubyonra...@googlegroups.com, xav1...@gmail.com
So maybe you should be using RVM:

Reply all
Reply to author
Forward
0 new messages