2012-01-26 35 views
0

所以我安裝了rails,Lion和pow服務器與MAMP一起運行rvm。一切都工作得不錯,直到我打開一個新的rails new project -d mysqlRails中的新項目(1.9.3 | 3.2.0) - 一堆錯誤

當我打開索引頁的索引頁,然後點擊「關於環境」,我得到這個:

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) 

另外,我得到這個每隔一段時間發出警告: 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

回答

1

看起來Pow正在使用您的系統的內置Ruby(1.8),而不是您安裝的RVM。

有時你需要強迫戰俘通過把一個.rvmrc文件在你的Rails應用程序的文件夾中使用您的RVM紅寶石(見Pow docs),像這樣的東西:

rvm 1.9.3 

您可能需要重新啓動您的應用程序對於此更新的工作:

touch tmp/restart.txt