当我尝试启动rails服务器时,我得到以下输出,并且服务器无法打开。红宝石和铁轨都是新手。
/Users/Seth/.rvm/gems/ruby-2.2.4/gems/json-1.8.3/lib/json/ext.rb:13:in require': incompatible library version - /Users/Seth/.rvm/gems/ruby-2.2.4/gems/json-1.8.3/lib/json/ext/parser.bundle (fatal)
from /Users/Seth/.rvm/gems/ruby-2.2.4/gems/json-1.8.3/lib/json/ext.rb:13:in
'
来自/Users/Seth/.rvm/gems/ruby-2.2.4/gems/json-1.8.3/lib/json/ext.rb:12:in <module:JSON>'
from /Users/Seth/.rvm/gems/ruby-2.2.4/gems/json-1.8.3/lib/json/ext.rb:9:in
'
来自/Users/Seth/.rvm/gems/ruby-2.2.4/gems/json-1.8.3/lib/json.rb:58:in require'
from /Users/Seth/.rvm/gems/ruby-2.2.4/gems/json-1.8.3/lib/json.rb:58:in
'
来自/Users/Seth/.rvm/gems/ruby-2.2.4/gems/json-1.8.3/lib/json.rb:54:in <top (required)>'
from /Users/Seth/.rvm/gems/ruby-2.2.4@global/gems/activesupport-4.2.6/lib/active_support/core_ext/object/json.rb:2:in
require'
来自/Users/Seth/.rvm/gems/ruby-2.2.4@global/gems/activesupport-4.2.6/lib/active_support/core_ext/object/json.rb:2:in <top (required)>'
from /Users/Seth/.rvm/gems/ruby-2.2.4@global/gems/activesupport-4.2.6/lib/active_support/core_ext/object.rb:12:in
require'
来自/Users/Seth/.rvm/gems/ruby-2.2.4@global/gems/activesupport-4.2.6/lib/active_support/core_ext/object.rb:12:in <top (required)>'
from /Users/Seth/.rvm/gems/ruby-2.2.4@global/gems/railties-4.2.6/lib/rails/configuration.rb:2:in
require'
来自/Users/Seth/.rvm/gems/ruby-2.2.4@global/gems/railties-4.2.6/lib/rails/configuration.rb:2:in <top (required)>'
from /Users/Seth/.rvm/gems/ruby-2.2.4@global/gems/railties-4.2.6/lib/rails/railtie.rb:2:in
require'
来自/Users/Seth/.rvm/gems/ruby-2.2.4@global/gems/railties-4.2.6/lib/rails/railtie.rb:2:in <top (required)>'
from /Users/Seth/.rvm/gems/ruby-2.2.4@global/gems/railties-4.2.6/lib/rails/engine.rb:1:in
require'
来自/Users/Seth/.rvm/gems/ruby-2.2.4@global/gems/railties-4.2.6/lib/rails/engine.rb:1:in <top (required)>'
from /Users/Seth/.rvm/gems/ruby-2.2.4@global/gems/railties-4.2.6/lib/rails/application.rb:7:in
require'
来自/Users/Seth/.rvm/gems/ruby-2.2.4@global/gems/railties-4.2.6/lib/rails/application.rb:7:in <top (required)>'
from /Users/Seth/.rvm/gems/ruby-2.2.4@global/gems/railties-4.2.6/lib/rails.rb:11:in
require'
来自/Users/Seth/.rvm/gems/ruby-2.2.4@global/gems/railties-4.2.6/lib/rails.rb:11:in <top (required)>'
from /Users/Seth/.rvm/gems/ruby-2.2.4@global/gems/railties-4.2.6/lib/rails/commands/server.rb:4:in
require'
来自/Users/Seth/.rvm/gems/ruby-2.2.4@global/gems/railties-4.2.6/lib/rails/commands/server.rb:4:in <top (required)>'
from /Users/Seth/.rvm/gems/ruby-2.2.4@global/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:123:in
require'
来自/Users/Seth/.rvm/gems/ruby-2.2.4@global/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:123:in require_command!'
from /Users/Seth/.rvm/gems/ruby-2.2.4@global/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:73:in
server'
来自/Users/Seth/.rvm/gems/ruby-2.2.4@global/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:39:in run_command!'
from /Users/Seth/.rvm/gems/ruby-2.2.4@global/gems/railties-4.2.6/lib/rails/commands.rb:17:in
'
来自/ Users / Seth / railsbridge / test_app / bin / rails:9:in require'
from /Users/Seth/railsbridge/test_app/bin/rails:9:in
'
来自/Users/Seth/.rvm/gems/ruby-2.2.4/gems/spring-1.7.1/lib/spring/client/rails.rb:28:in load'
from /Users/Seth/.rvm/gems/ruby-2.2.4/gems/spring-1.7.1/lib/spring/client/rails.rb:28:in
来电'
来自/Users/Seth/.rvm/gems/ruby-2.2.4/gems/spring-1.7.1/lib/spring/client/command.rb:7:in call'
from /Users/Seth/.rvm/gems/ruby-2.2.4/gems/spring-1.7.1/lib/spring/client.rb:30:in
run'
来自/Users/Seth/.rvm/gems/ruby-2.2.4/gems/spring-1.7.1/bin/spring:49:in <top (required)>'
from /Users/Seth/.rvm/gems/ruby-2.2.4/gems/spring-1.7.1/lib/spring/binstub.rb:11:in
load'
来自/Users/Seth/.rvm/gems/ruby-2.2.4/gems/spring-1.7.1/lib/spring/binstub.rb:11:in <top (required)>'
from /Users/Seth/railsbridge/test_app/bin/spring:13:in
require'
from / Users / Seth / railsbridge / test_app / bin / spring:13:in <top (required)>'
from bin/rails:3:in
load'
来自bin / rails:3:in''
答案 0 :(得分:0)
尝试链接不同的lib而不是构建时的lib。 您是从其他位置复制构建还是更新了libs? 无论如何重新安装应该工作,因为它将再次构建它。