我有一个奇怪的问题:我在rvm上的rails上安装了ruby。一切都还可以,我可以创建项目..但是在我重新启动后输入“rails new”时,我“目前没有安装”程序'rails'。“。
System Ubuntu 12.04
ruby -v
"1.9.3p194"
gem list
actionmailer (3.2.5)
actionpack (3.2.5)
activemodel (3.2.5)
activerecord (3.2.5)
activeresource (3.2.5)
activesupport (3.2.5)
arel (3.0.2)
builder (3.0.0)
bundler (1.1.4)
coffee-rails (3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.3.3)
erubis (2.7.0)
execjs (1.4.0)
hike (1.2.1)
i18n (0.6.0)
journey (1.0.3)
jquery-rails (2.0.2)
json (1.7.3)
mail (2.4.4)
mime-types (1.18)
multi_json (1.3.6)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.2.5)
railties (3.2.5)
rake (0.9.2.2)
rdoc (3.12)
rubygems-bundler (1.0.2)
rvm (1.11.3.3)
sass (3.1.19)
sass-rails (3.2.5)
sprockets (2.1.3)
sqlite3 (1.3.6)
thor (0.15.2)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.33)
uglifier (1.2.4)
答案 0 :(得分:7)
将其添加到〜/ .bashrc文件的底部:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
如果不起作用,请尝试:
[[ -s "/home/yourusername/.rvm/scripts/rvm" ]] && source "/home/yourusername/.rvm/scripts/rvm"
答案 1 :(得分:1)
Terminal
- > Edit
- > Profile Preferences
- > Title and Command
- > Run command as a login shell
答案 2 :(得分:0)
我猜你需要编辑你的终端设置
试试吧 https://beatreader.wordpress.com/2016/08/09/ruby-on-rails-problemmissing-after-reboot/ 要么 每次打开终端
时都需要运行此代码source "$HOME/.rvm/scripts/rvm"