rails -v 无法加载此类文件 -- rails/cli (LoadError) [英] rails -v cannot load such file -- rails/cli (LoadError)

查看:84
本文介绍了rails -v 无法加载此类文件 -- rails/cli (LoadError)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Ubuntu 14.04.

Ubuntu 14.04.

所以一切正常,我的终端打开了两个选项卡——一个选项卡在我的 sebcoles 项目上运行 webbrick,另一个选项卡我用来克隆我的 english_teacher 存储库.一切都下载好了,我切换到目录.

So everything was working fine and I had my terminal open with two tabs - one tab had webbrick running on my sebcoles project, and the other tab I used to clone my english_teacher repo. It all downloaded fine and I changed into the directory.

我会在这里粘贴所有内容 - 一切都非常清楚:

I'll just paste everything here - it's all pretty clear:

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>'

所以,基本上我现在被搞砸了 - 我什么也做不了.帮助!

So, basically I'm screwed at the moment - I can't do anything. Help!

推荐答案

原来我只需要跑捆绑安装一切都很好.但是,对于使用回形针 gem 的 pinteresting repo,我必须运行sudo apt-get 安装 imagemagick以便上传开发中的图片.

Turns out I just had to run bundle install and everything was fine. However, for my pinteresting repo, which uses the paperclip gem, I had to run sudo apt-get install imagemagick in order to upload images in development.

虽然还不敢提交任何新内容并推送和部署到 heroku.不过我觉得应该没问题(碰木头).

Haven't dared commit anything new and push and deploy to heroku yet though. I think it should be fine though (touch wood).

这篇关于rails -v 无法加载此类文件 -- rails/cli (LoadError)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆