Ubuntu 14.04。
所以一切工作正常,我打开了带有两个选项卡的终端 - 一个选项卡在我的 sebcoles 项目上运行 webbrick,另一个选项卡用于克隆我的 english_teacher 存储库。一切都下载得很好,我进入了目录。
我将把所有内容粘贴到这里 - 一切都非常清楚:
andrew:projects$ cd pinteresting
RVM used your Gemfile for selecting Ruby, it is all fine - Heroku does that too,
you can ignore these warnings with 'rvm rvmrc warning ignore /home/andrew/projects/pinteresting/Gemfile'.
To ignore the warning for all files run 'rvm rvmrc warning ignore allGemfiles'.
ruby-2.1.5 is not installed.
To install do: 'rvm install ruby-2.1.5'
andrew:pinteresting$ rvm install ruby-2.1.5
Warning, new version of rvm available '1.26.11', you are using older version '1.26.10'.
You can disable this warning with: echo rvm_autoupdate_flag=0 >> ~/.rvmrc
You can enable auto-update with: echo rvm_autoupdate_flag=2 >> ~/.rvmrc
Searching for binary rubies, this might take some time.
Found remote file https://rvm_io.global.ssl.fastly.net/binaries/ubuntu/14.04/x86_64/ruby-2.1.5.tar.bz2
Checking requirements for ubuntu.
Requirements installation successful.
ruby-2.1.5 - #configure
ruby-2.1.5 - #download
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 23.1M 100 23.1M 0 0 1189k 0 0:00:19 0:00:19 --:--:-- 1381k
No checksum for downloaded archive, recording checksum in user configuration.
ruby-2.1.5 - #validate archive
ruby-2.1.5 - #extract
ruby-2.1.5 - #validate binary
ruby-2.1.5 - #setup
ruby-2.1.5 - #gemset created /home/andrew/.rvm/gems/ruby-2.1.5@global
ruby-2.1.5 - #importing gemset /home/andrew/.rvm/gemsets/global.gems....................................
ruby-2.1.5 - #generating global wrappers........
ruby-2.1.5 - #gemset created /home/andrew/.rvm/gems/ruby-2.1.5
ruby-2.1.5 - #importing gemsetfile /home/andrew/.rvm/gemsets/default.gems evaluated to empty gem list
ruby-2.1.5 - #generating default wrappers........
andrew:pinteresting$ heroku status
=== Heroku Status
Development: No known issues at this time.
Production: No known issues at this time.
andrew:pinteresting$ rails s
/home/andrew/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- rails/cli (LoadError)
from /home/andrew/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/bin/rails:7:in `<main>'
andrew:pinteresting$ rails -v
/home/andrew/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- rails/cli (LoadError)
from /home/andrew/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/bin/rails:7:in `<main>'
所以,基本上我现在已经完蛋了——我什么也做不了。救命!
您已经安装了
rvm
但忘记安装 rails
gem。安装使用:
gem install rails
原来我只需要跑步 捆绑安装 一切都很好。然而,对于我的 pinteresting 存储库,它使用回形针 gem,我必须运行 sudo apt-get 安装 imagemagick 为了上传开发中的图像。
还不敢提交任何新内容并推送和部署到 Heroku。我认为应该没问题(触摸木头)。
我也有同样的错误。我忘记切换到正确的 ruby 版本并使用 rvm 更正 gemset。就是这样,我能够解决这个问题。
$rvm list
$rvm use ruby version
$rvm gemset use gemset-name
就我而言,以下命令有效。
bundle install
bundle clean --force