ruby-on-rails – 无法通过rvm安装从命令行运行rails
发布时间:2020-12-17 02:03:02 所属栏目:百科 来源:网络整理
导读:我刚刚在新的 Linux Mint机器上用rails重新安装了rvm 我可以看到我的宝石中安装了rails gem query --local*** LOCAL GEMS ***...other stuff ...rails (3.2.8)...other stuff ... 但如果我尝试从控制台运行,我看不到它 $rails -vThe program 'rails' is curr
我刚刚在新的
Linux Mint机器上用rails重新安装了rvm
我可以看到我的宝石中安装了rails gem query --local *** LOCAL GEMS *** ...other stuff ... rails (3.2.8) ...other stuff ... 但如果我尝试从控制台运行,我看不到它 $rails -v The program 'rails' is currently not installed. You can install it by typing: sudo apt-get install rails 这是我的PATH变量 /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/motta/.rvm/bin 我应该在路径中添加哪些轨道? 更新: rvm rubies =* ruby-1.9.3-p286 [ x86_64 ] # => - current # =* - current && default # * - default 安装已按照rvm说明进行 解决了: PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting 因此我认为不再需要以下一个,但事实并非如此 [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session. 将上面的一个添加到.bashrc解决了我的问题 解决方法
尝试按照以下步骤安装RVM,然后安装rails
http://rails.vandenabeele.com/blog/2011/11/26/installing-ruby-and-rails-with-rvm-on-ubuntu-11-dot-10/ 要么 https://rvm.io/rvm/install/ (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |