[英]Could not find RubyGem rails - Rails Server error
I'm new to rails/ruby and I'm following a tutorial on how to create your first app using git and heroku! 我是Rails / ruby的新手,并且正在关注有关如何使用git和heroku创建第一个应用程序的教程!
After figuring out the sqlite3 debacle, the error I receive now comes every time I try to start a server. 解决了sqlite3的混乱之后,每次尝试启动服务器时都会出现我收到的错误。
rails server
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:827:in `report_activate_error': Could not find RubyGem rails (>= 0) (Gem::LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:261:in `activate'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:68:in `gem'
from /usr/bin/rails:18
This error is a pain in the arse, and I don't know how to get around it. 该错误是一个麻烦,我不知道该如何解决。 There's several articles on here about this particular error, but no one mentions receiving this error while trying to launch the server.
这里有几篇有关此特定错误的文章,但是没有人提到在尝试启动服务器时收到此错误。
Is there anybody out there that could walk me through the steps to take to remedy this. 有没有人可以引导我逐步采取补救措施。
Let me know, I'm trying to move forward ad don't want to be stuck at this particular error for days. 让我知道,我正努力向前推进广告,不想持续几天陷入这一特定错误。
First you should install rvm: https://rvm.io/rvm/install then you should install ruby =< 1.9.3 首先,您应该安装rvm: https ://rvm.io/rvm/install,然后应安装ruby = <1.9.3
rvm install 2.1
then you should install rails 那你应该安装滑轨
rvm use 2.1 && gem install rails
then 然后
cd PROJECT_PATH && rails server
everything should work fine 一切都应该正常
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.