我最近在fedora 12中安装了rails.我也是linux新手.在Windows 7上一切正常.但我在linux中面临很多问题.请帮忙!
我已经安装了所有必需品,以使基本脚本/服务器启动并运行.我在尝试脚本/服务器时弹出boot.rb时出现此错误.我想在此提供的一些细节:
安装rails,ruby和gem的目录,
[vineeth@localhost my_app]$ which ruby
/usr/local/bin/ruby
[vineeth@localhost my_app]$ which rails
/usr/bin/rails
[vineeth@localhost my_app]$ which gem
/usr/bin/gem
Run Code Online (Sandbox Code Playgroud)
当我运行脚本/服务器时,这就是错误.
[vineeth@localhost my_app]$ script/server
./script/../config/boot.rb:9:in `require': no such file to load -- rubygems (LoadError)
from ./script/../config/boot.rb:9
from script/server:2:in `require'
from script/server:2
Run Code Online (Sandbox Code Playgroud)
PATH文件看起来像这样
[vineeth@localhost my_app]$ cat ~/.bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH="/usr/local/bin:/usr/local/sbin:/usr/bin/ruby:$PATH"
Run Code Online (Sandbox Code Playgroud)
我想这与PATH文件有关.让我知道我需要在这里改变什么.如果我还有其他变化,请告诉我.
我刚刚从Heroku切换到亚马逊网络服务.以前我使用带有Ruby的命令提示符(来自我的Windows PC)运行了所有Rails命令行命令.但是,在我登录到我的Amazon Linux EC2实例,然后进入我的应用程序目录后,我收到此错误:
/usr/bin/rails:9:in `require': no such file to load -- rubygems (LoadError)
from /usr/bin/rails:9
Run Code Online (Sandbox Code Playgroud)
当我尝试运行任何命令时rails console.
我回顾了这个问题,但似乎并没有多个Ruby库适用于我,因为
which -a ruby
只产生一个位置:
/usr/bin/ruby
此外,这个问题似乎没有帮助,因为我没有.当我尝试输入时
rvm use 1.9.3
我收到此消息:
-bash: rvm: command not found
这是我第一次看到Linux环境,所以任何帮助都会受到赞赏.谢谢!