我的rails本地开发很好,但是在尝试RubyMine之后突然间一切都坏了,我只是使用sublime文本作为项目的编辑器,然后想试用RubyMine。
现在,在此阶段,我无法使用'rails s'命令启动任何应用程序。 我尝试使用“ rails new myapp”安装新应用,但问题仍然存在。
我是Rails的新手,我被卡住了,任何帮助将不胜感激!谢谢!
这是我遇到的错误
hemps-MBP:experiment hemp$ rails s
Traceback (most recent call last):
58: from bin/rails:3:in `<main>'
57: from bin/rails:3:in `load'
56: from /Users/hemp/Documents/tutorials/ROR/experiment/bin/spring:15:in `<top (required)>'
55: from /Users/hemp/Documents/tutorials/ROR/experiment/bin/spring:15:in `require'
54: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
53: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
52: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
51: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
50: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
49: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
48: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
47: from /Users/hemp/Documents/tutorials/ROR/experiment/bin/rails:9:in `<top (required)>'
46: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `require'
45: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:253:in `load_dependency'
44: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `block in require'
43: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
42: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
41: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
40: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
39: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
38: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/railties-5.2.1/lib/rails/commands.rb:18:in `<main>'
37: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/railties-5.2.1/lib/rails/command.rb:46:in `invoke'
36: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/railties-5.2.1/lib/rails/command/base.rb:65:in `perform'
35: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
34: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
33: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
32: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/railties-5.2.1/lib/rails/commands/server/server_command.rb:142:in `perform'
31: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/railties-5.2.1/lib/rails/commands/server/server_command.rb:142:in `tap'
30: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/railties-5.2.1/lib/rails/commands/server/server_command.rb:145:in `block in perform'
29: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `require'
28: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:253:in `load_dependency'
27: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `block in require'
26: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
25: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
24: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
23: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
22: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
21: from /Users/hemp/Documents/tutorials/ROR/experiment/config/application.rb:7:in `<main>'
20: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.5/lib/bundler.rb:114:in `require'
19: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.5/lib/bundler/runtime.rb:65:in `require'
18: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.5/lib/bundler/runtime.rb:65:in `each'
17: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.5/lib/bundler/runtime.rb:76:in `block in require'
16: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.5/lib/bundler/runtime.rb:76:in `each'
15: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.5/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
14: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
13: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
12: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
11: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
10: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
9: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/sqlite3-1.3.13/lib/sqlite3.rb:2:in `<main>'
8: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/sqlite3-1.3.13/lib/sqlite3.rb:6:in `rescue in <main>'
7: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `require'
6: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:253:in `load_dependency'
5: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `block in require'
4: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
3: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
2: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
1: from /Users/hemp/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
/Users/hemp/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require': dlopen(/Users/hemp/.rvm/gems/ruby-2.5.1/gems/sqlite3-1.3.13/lib/sqlite3/sqlite3_native.bundle, 9): Symbol not found: _rb_cFixnum (LoadError)
Referenced from: /Users/hemp/.rvm/gems/ruby-2.5.1/gems/sqlite3-1.3.13/lib/sqlite3/sqlite3_native.bundle
Expected in: flat namespace
in /Users/hemp/.rvm/gems/ruby-2.5.1/gems/sqlite3-1.3.13/lib/sqlite3/sqlite3_native.bundle - /Users/hemp/.rvm/gems/ruby-2.5.1/gems/sqlite3-1.3.13/lib/sqlite3/sqlite3_native.bundle
hemps-MBP:experiment hemp$
答案 0 :(得分:0)
似乎是Gemfile的问题。请删除宝石sqlite3,然后重试一次。如果仍无法解决,请尝试通过RVM使用diff ruby版本。