pyronaur
pyronaur

Reputation: 3545

New Project in Rails ( 1.9.3 | 3.2.0 ) - Bunch of errors

So I've installed rvm with rails, on Lion, and pow server running alongside with MAMP. Everything works pretty okay, until I open the index page on a fresh rails new project -d mysql

When I open up the index page, and click "about environment", I get this:

SyntaxError: /Users/hb/Projects/mon/config/initializers/session_store.rb:3: syntax error, unexpected ':', expecting $end
...sion_store :cookie_store, key: '_mon_session'
                              ^
    /Library/Ruby/Gems/1.8/gems/activesupport-  3.2.0/lib/active_support/dependencies.rb:245:in `load'
    /Library/Ruby/Gems/1.8/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:245:in `load'
    /Library/Ruby/Gems/1.8/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:236:in `load_dependency'
    /Library/Ruby/Gems/1.8/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:245:in `load'
    /Library/Ruby/Gems/1.8/gems/railties-3.2.0/lib/rails/engine.rb:588
    Show 17 more lines (<--a link)

Also, I get this warning every once in a while: Users/me/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.0/lib/rails/script_rails_loader.rb:11: warning: Insecure world writable dir /Applications in PATH, mode 040777

Upvotes: 0

Views: 259

Answers (1)

Dylan Markow
Dylan Markow

Reputation: 124469

It looks like Pow is using your system's built-in Ruby (1.8) instead of the RVM one you installed.

Sometimes you need to force Pow to use your RVM Ruby by putting a .rvmrc file in your Rails app's folder (see the Pow docs), with something like this:

rvm 1.9.3

You may need to restart your app for this update to work:

touch tmp/restart.txt

Upvotes: 1

Related Questions