Rails服务器不会运行

Rails Server will not run

正在打字

$ rails server 

在 mac 上的终端中产生了这两个错误,我尝试通过卸载并再次安装 ruby & rails 进行故障排除并得到同样的错误。

正在打字

localhost:3000 

在浏览器上带来了一个损坏的网页,这意味着 rails 没有 运行 正确。

作为一个完全的初学者,我如何简单地逐步解决下面这些问题,使rails达到运行?

Ignoring binding_of_caller-0.7.2 because its extensions are not built.  Try: gem pristine binding_of_caller --version 0.7.2
Ignoring byebug-8.2.2 because its extensions are not built.  Try: gem pristine byebug --version 8.2.2
Ignoring debug_inspector-0.0.2 because its extensions are not built.  Try: gem pristine debug_inspector --version 0.0.2
Ignoring executable-hooks-1.3.2 because its extensions are not built.  Try: gem pristine executable-hooks --version 1.3.2
Ignoring gem-wrappers-1.2.7 because its extensions are not built.  Try: gem pristine gem-wrappers --version 1.2.7
Ignoring mysql2-0.4.2 because its extensions are not built.  Try: gem pristine mysql2 --version 0.4.2
Ignoring nokogiri-1.6.7.2 because its extensions are not built.  Try: gem pristine nokogiri --version 1.6.7.2
Ignoring binding_of_caller-0.7.2 because its extensions are not built.  Try: gem pristine binding_of_caller --version 0.7.2
Ignoring byebug-8.2.2 because its extensions are not built.  Try: gem pristine byebug --version 8.2.2
Ignoring debug_inspector-0.0.2 because its extensions are not built.  Try: gem pristine debug_inspector --version 0.0.2
Ignoring executable-hooks-1.3.2 because its extensions are not built.  Try: gem pristine executable-hooks --version 1.3.2
Ignoring gem-wrappers-1.2.7 because its extensions are not built.  Try: gem pristine gem-wrappers --version 1.2.7
Ignoring mysql2-0.4.2 because its extensions are not built.  Try: gem pristine mysql2 --version 0.4.2
Ignoring nokogiri-1.6.7.2 because its extensions are not built.  Try: gem pristine nokogiri --version 1.6.7.2
dyld: lazy symbol binding failed: Symbol not found: _rb_data_typed_object_alloc
  Referenced from: /Users/Leviathan/.rvm/gems/ruby-2.2.1/gems/debug_inspector-0.0.2/lib/debug_inspector.bundle
  Expected in: flat namespace

dyld: Symbol not found: _rb_data_typed_object_alloc
  Referenced from: /Users/Leviathan/.rvm/gems/ruby-2.2.1/gems/debug_inspector-0.0.2/lib/debug_inspector.bundle
  Expected in: flat namespace

Trace/BPT trap: 5

编辑:首先尝试 运行ning gem pristine --all

尝试卸载并重新安装捆绑程序:

gem uninstall bundler 然后 gem install bundler

然后运行bundle install

这将安装您应该在 Gemfile 中指定的所有 gem,以及所有扩展。

例如Bundle complete! 33 Gemfile dependencies, 103 gems now installed.