我正在尝试安装ruby版本4.1.4。我将它保存在特定的宝石集中
rvm use ruby-2.1.2@rails4.1.4 --create
gem install rails --version=4.1.4
bundle install
rails -v
我总是回到3.2.9。如果我在捆绑安装之前运行rails -v,我会得到
无法找到任何版本的铁路(3.2.9) 来源运行
bundle install
以安装缺少的宝石。
当我运行bundle install时,我注意到rails的版本是3.2.9。对此有一个简单的解决方法。
Fetching gem metadata from https://rubygems.org/.........
Using rake 10.3.2
Using i18n 0.6.11
Using multi_json 1.10.1
Installing activesupport 3.2.9
Installing builder 3.0.4
Installing activemodel 3.2.9
Using erubis 2.7.0
Installing journey 1.0.4
Installing rack 1.4.5
Installing rack-cache 1.2
Using rack-test 0.6.2
Using hike 1.2.3
Using tilt 1.4.1
Installing sprockets 2.2.2
Installing actionpack 3.2.9
Using mime-types 1.25.1
Using polyglot 0.3.5
Using treetop 1.4.15
Installing mail 2.4.4
Installing actionmailer 3.2.9
Installing arel 3.0.3
Installing tzinfo 0.3.40
Installing activerecord 3.2.9
Installing activeresource 3.2.9
Installing coffee-script-source 1.7.1
Installing execjs 2.2.1
Installing coffee-script 2.3.0
Installing rack-ssl 1.3.4
Using json 1.8.1
Installing rdoc 3.12.2
Using thor 0.19.1
Installing railties 3.2.9
Installing coffee-rails 3.2.2
Installing jquery-rails 3.1.1
Using bundler 1.6.5
Installing rails 3.2.9
Installing sass 3.3.11
Installing sass-rails 3.2.6
Installing sqlite3 1.3.9
Installing strong_parameters 0.2.3
Installing uglifier 2.5.3
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
Post-install message from rdoc:
Depending on your version of ruby, you may need to install ruby rdoc/ri data:
<= 1.8.6 : unsupported
= 1.8.7 : gem install rdoc-data; rdoc-data --install
= 1.9.1 : gem install rdoc-data; rdoc-data --install
>= 1.9.2 : nothing to do! Yay!
任何想法如何获得4.1.4?
由于
答案 0 :(得分:2)
首先,在适当的位置使用bundle exec
作为前缀命令。
其次,你试过bundle update rails
吗?这可能是你的Gemfile.lock的问题......