[英]Ruby, Rails console start with error…need help
> luke@Macbook-Pro~/Documents/workspace/RoR/rails_projects/sample4_app$ ruby -v
ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-darwin10.8.0]
luke@Macbook-Pro~/Documents/workspace/RoR/rails_projects/sample4_app$ rails -v
Rails 3.0.9
luke@Macbook-Pro~/Documents/workspace/RoR/rails_projects/sample4_app$ rails console
/Users/luke/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/i686-darwin10.8.0/readline.bundle: dlopen(/Users/luke/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/i686-darwin10.8.0/readline.bundle, 9): Symbol not found: _rl_basic_quote_characters (LoadError)
Referenced from: /Users/luke/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/i686-darwin10.8.0/readline.bundle
Expected in: flat namespace
in /Users/luke/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/i686-darwin10.8.0/readline.bundle - /Users/luke/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/i686-darwin10.8.0/readline.bundle
from /Users/luke/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/irb/completion.rb:10
from /Users/luke/.rvm/gems/ruby-1.8.7-p352/gems/railties-3.0.9/lib/rails/commands/console.rb:3:in `require'
from /Users/luke/.rvm/gems/ruby-1.8.7-p352/gems/railties-3.0.9/lib/rails/commands/console.rb:3
from /Users/luke/.rvm/gems/ruby-1.8.7-p352/gems/railties-3.0.9/lib/rails/commands.rb:20:in `require'
from /Users/luke/.rvm/gems/ruby-1.8.7-p352/gems/railties-3.0.9/lib/rails/commands.rb:20
from script/rails:6:in `require'
from script/rails:6
Ruby is okay, Rails is okay, but "rails console" Need help Thanks Ruby可以,Rails可以,但是“ rails console”需要帮助谢谢
Looks like you're missing a file in your ruby build. 看起来您在ruby构建中缺少文件。 Did you just recently update to OS X 10.7?
您最近才更新到OS X 10.7吗? You might need a fresh reinstall of Rails.
您可能需要重新安装Rails。 As always this can be done with:
与往常一样,可以使用以下方法完成此操作:
sudo gem install rails
Sorry I can't be of more help. 抱歉,我没有更多帮助。
Suggest using bundler to manage the gems in your project. 建议使用捆绑程序来管理项目中的gem。
If you put 如果你把
source 'http://rubygems.org'
gem 'rails', '3.0.9'
in your Gemfile (see also http://gembundler.com/ ) 在您的Gemfile中(另请参见http://gembundler.com/ )
Then 然后
bundle install
will install the correct version of rails and 将安装正确版本的rails和
bundle exec rails console
will start up your console. 将启动您的控制台。
bundle exec rails server
will start the server, etc. bundle exec rails server
将启动服务器, bundle exec rails server
。
You might also want to consider using rvm
to install and manage your rubies if you aren't already -- http://beginrescueend.com/ 您可能还需要考虑使用
rvm
来安装和管理您的红宝石,如果你是不是已经- http://beginrescueend.com/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.