0

When i typed: sudo rake db:migrate

I got:

rake aborted ! /home/trace/config/initializers/session_store.rb:3: syntax error, unexpected ':', expecting $end...sion_store :cookie_store, key: '_trace_session' 

Note that my version of ruby is:

 ruby -v: 1.9.2p312 

And that in my bashrc i have:

rvm use 1.9.2-final@rails310. 

session_store.rb:

# Be sure to restart your server when you modify this file. Trace::Application.config.session_store :cookie_store, key: '_trace_session' 

Thanks in advance

3
  • Could you post your session_store.rb file? Commented Jan 23, 2012 at 15:46
  • @Dupont Please edit your question to contain the new code. Don't post updated code in comments. Commented Jan 23, 2012 at 16:23
  • What if you try move your rvm use 1.9.2-final@rails310 into .rvmrc (and try to remove dot at the end)? Commented Jan 23, 2012 at 17:27

2 Answers 2

5

The problem is that you're using sudo... this is causing the system's Ruby (probably 1.8.7) to be used instead of your rvm Ruby. Just get rid of the sudo and run this:

rake db:migrate 
Sign up to request clarification or add additional context in comments.

Comments

0

Whenver rvm in used, sudo is skipped unless we need to install system libraries if the gem installation fails which installed in system. All the local gems are used from the gemset or from the global if no gemset is specified.Just have look over a tutorial on web to make things easier in rvm. solution suggested by dylan makes things clear.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.