我正在尝试执行命令,bundle install
它显示错误消息
Gem::InstallError: capybara requires Ruby version >= 1.9.3.
An error occurred while installing capybara (2.1.0), and Bundler cannot continue.
Make sure that `gem install capybara -v '2.1.0'` succeeds before bundling.
所以我升级ruby 1.8.2
到ruby 1.9.3
并将其设置为默认值rvm.
$ rvm list
rvm rubies
=* ruby-1.9.3-p448 [ x86_64 ]
# => - current
# =* - current && default
# * - default
$ ruby -v
我正进入(状态ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
执行 bundle install 时出现同样的错误。
因为使用rvm
我使用命令gem install capybara -v '2.1.0'
iam getting
ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions into the /var/lib/gems/1.9.1 directory
后来我试过了sudo gem install capybara -v '2.1.0'
它成功安装
所以我再次使用 bundle install 命令在我的 gem 文件中安装了剩余的 gems,它再次显示上述相同的错误。
Gem::InstallError: capybara requires Ruby version >= 1.9.3.
An error occurred while installing capybara (2.1.0), and Bundler cannot continue.
Make sure that `gem install capybara -v '2.1.0'` succeeds before bundling.