加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – rails -v无法加载这样的文件 – rails / cli(L

发布时间:2020-12-16 19:07:23 所属栏目:百科 来源:网络整理
导读:Ubuntu 14.04. 所以一切都工作正常,我的终端打开了两个标签 – 一个标签在我的sebcoles项目上运行webbrick,另一个标签我用来克隆我的english_teacher repo.这一切都下载得很好,我改成了目录. 我只需将所有内容粘贴在这里 – 这一切都很清楚: andrew:project
Ubuntu 14.04.

所以一切都工作正常,我的终端打开了两个标签 – 一个标签在我的sebcoles项目上运行webbrick,另一个标签我用来克隆我的english_teacher repo.这一切都下载得很好,我改成了目录.

我只需将所有内容粘贴在这里 – 这一切都很清楚:

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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读