![](/img/trans.png)
[英]rake assets:precompile After changing ruby version and bundler version
[英]Changing ruby version disables rails and bundler
我將跟着Michael Hartl的RoR教程。 遇到問題后,我對SO有了很好的建議,可以從github上獲取Hartl的參考代碼,這已經完成了。
但是,按照他的指示在tmp目錄中設置參考代碼時,我可以使用rbenv 2.1.1版(在這種情況下與gem文件沖突),也可以使用Ruby 2.0.0-p451版作為在gem文件中,在這種情況下,捆綁程序和導軌都不會運行。 我得到以下內容(例如)-
Dans-MacBook-Air:sample_app_rails_4 dan$ rails
Your Ruby version is 2.1.1, but your Gemfile specified 2.0.0
Dans-MacBook-Air:sample_app_rails_4 dan$ rbenv local 2.0.0-p451
Dans-MacBook-Air:sample_app_rails_4 dan$ rbenv rehash
Dans-MacBook-Air:sample_app_rails_4 dan$ bundler install
rbenv: bundler: command not found
The `bundler' command exists in these Ruby versions:
2.1.1
Dans-MacBook-Air:sample_app_rails_4 dan$
我可以只更改gemfile中的ruby版本,但是我試圖找出另一個錯誤,所以我想精確地復制原始版本。
感謝您閱讀本文-有什么想法嗎? 當我安裝rails等時,我正在使用Ruby 2.1.1-這是否引起了問題?
每個版本的紅寶石都有自己的寶石集。 您必須為每個Ruby版本再次安裝bundler。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.