突然找不到Rails安装

时间:2014-05-11 09:30:10

标签: ruby-on-rails ruby-on-rails-4

我正在使用Ruby on Rails 4.0.5,我在.bash_profile中有这个:

 -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*

但是我收到了这个错误:

The program 'rails' can be found in the following packages:
 * ruby-railties-3.2
 * ruby-railties-4.0
Try: sudo apt-get install <selected package>

Rails工作正常,但突然它不再工作了。我怎样才能让Rails再次运行?

供参考,以下是运行rvm info

的输出
jean@jean-ThinkPad-L430:~/development/public/COPD$ rvm info

ruby-2.1.0:

  system:
    uname:       "Linux jean-ThinkPad-L430 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:31:42 UTC 2014 i686 i686 i686 GNU/Linux"
    system:      "ubuntu/14.04/i386"
    bash:        "/bin/bash => GNU bash, version 4.3.11(1)-release (i686-pc-linux-gnu)"
    zsh:         "/usr/bin/zsh => zsh 5.0.2 (i686-pc-linux-gnu)"

  rvm:
    version:      "rvm 1.25.25 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]"
    updated:      "9 hours 56 minutes 27 seconds ago"
    path:         "/home/jean/.rvm"

  ruby:
    interpreter:  "ruby"
    version:      "2.1.0p0"
    date:         "2013-12-25"
    platform:     "i686-linux"
    patchlevel:   "2013-12-25 revision 44422"
    full_version: "ruby 2.1.0p0 (2013-12-25 revision 44422) [i686-linux]"

  homes:
    gem:          "/home/jean/.rvm/gems/ruby-2.1.0"
    ruby:         "/home/jean/.rvm/rubies/ruby-2.1.0"

  binaries:
    ruby:         "/home/jean/.rvm/rubies/ruby-2.1.0/bin/ruby"
    irb:          "/home/jean/.rvm/rubies/ruby-2.1.0/bin/irb"
    gem:          "/home/jean/.rvm/rubies/ruby-2.1.0/bin/gem"
    rake:         "/home/jean/.rvm/gems/ruby-2.1.0/bin/rake"

  environment:
    PATH:         "/home/jean/.rvm/gems/ruby-2.1.0/bin:/home/jean/.rvm/gems/ruby-2.1.0@global/bin:/home/jean/.rvm/rubies/ruby-2.1.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/jean/.rvm/bin"
    GEM_HOME:     "/home/jean/.rvm/gems/ruby-2.1.0"
    GEM_PATH:     "/home/jean/.rvm/gems/ruby-2.1.0:/home/jean/.rvm/gems/ruby-2.1.0@global"
    MY_RUBY_HOME: "/home/jean/.rvm/rubies/ruby-2.1.0"
    IRBRC:        "/home/jean/.rvm/rubies/ruby-2.1.0/.irbrc"
    RUBYOPT:      ""
    gemset:       ""

2 个答案:

答案 0 :(得分:2)

RVM error with gnome-terminal

答案记录在https://rvm.io/integration/gnome-terminal

Guake终端 右键单击Guake终端 - 选择 - &gt;首选项=&gt;选中{运行命令作为登录shell}

Ubuntu终端 =&gt;右键点击终端=&gt;个人资料=&gt;个人资料首选项=&gt; [TAB]标题和命令=&gt;选中{运行命令作为登录shell}

答案 1 :(得分:0)

添加Papouche的答案执行以下命令将在命令行中执行相同的操作bash -l