我最近在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文件有关.让我知道我需要在这里改变什么.如果我还有其他变化,请告诉我.
我最近跟着一些RVM的指令进行安装ruby-debug,我认为它可能会引起一些问题.我找到说明的链接在这里:http://beginrescueend.com/support/troubleshooting/
我以前安装的命令如下:
$ rvm reinstall 1.9.3 --patch debug --force-autoconf
$ gem install ruby-debug19 -- --with-ruby-include="${MY_RUBY_HOME/rubies/src}"
Run Code Online (Sandbox Code Playgroud)
现在,当我尝试启动rails服务器时,收到以下错误:
./bundler_stubs/rails:13:in `require': no such file to load -- rubygems (LoadError)
from ./bundler_stubs/rails:13
Run Code Online (Sandbox Code Playgroud)
这个SO问题会让我相信我安装了多个版本的rails:没有这样的文件要加载 - rubygems(LoadError)
但是,当我which -a ruby按照所选答案的建议运行时,我只会收到/usr/bin/ruby.关于在这里做什么的任何想法?