我在學習Rails,而且對於Macports來說還是比較新的。Macports的問題Ruby19安裝
/...config/initializers/session_store.rb:3: syntax error, unexpected ':', expecting $end
我相信這句法錯誤運行一個版本的Rails,低於1.9.0證實,因爲ruby -v
給我ruby 1.8.7
造成的:
我爲我的項目運行rails server
時收到以下錯誤。
的問題是,我敢肯定,我已經安裝了Ruby 1.9.3
我已經運行port clean ruby19
和各種組合安裝Ruby 1.9.3
port install ruby19
port install ruby19 -nosuffix
兩者都給我以下錯誤:
Error: org.macports.activate for port ruby19 returned: Image error: /opt/local/bin/erb is being used by the active ruby port. Please deactivate this port first, or use 'port -f activate ruby19' to force the activation.
如果我跑port -f activate ruby19
我得到這個錯誤:
---> The following versions of ruby19 are currently installed:
---> ruby19 @1.9.3-p194_3+doc (active)
---> ruby19 @1.9.3-p194_3+doc+mactk
---> ruby19 @1.9.3-p194_3+doc+nosuffix
Error: port activate failed: Registry error: Please specify the full version as recorded in the port registry.
我在哪裏何去何從?
我基本上想要最快最簡單的解決方案來啓動並運行此項目 - 我的機器上不需要多個版本的ruby。
來吧我知道我不能成爲第一個這個問題! RVM真的是人們做這件事的唯一方式嗎?
非常感謝提前!
謝謝 - 我來看看。什麼是RVM它是macports的替代品? –
rvm是一個本地ruby安裝程序,它允許您並行運行多個ruby,即,您可以選擇要在終端中運行哪一個,並且可以使用簡單的命令更改它。 – three
我看到了 - 理想情況下,我想將它啓動並使用macports運行,因爲此時我的機器上還有其他所有東西。我還不需要多個版本的Ruby。如果我真的無法獲得macports版本,我會進一步調查RVM。謝謝! –