我运行了以下命令:
$> rails server
$> rails generate controller welcm indx
我得到的只是一堆红宝石宝石(例如sqlite3,bootsnap等)的加载错误。
我尝试过:
bundle install
这是错误:
Traceback (most recent call last):
59: from bin/rails:3:in `<main>'
58: from bin/rails:3:in `load'
57: from /home/sindibad/Documents/RailsApps/kpp/bin/spring:15:in `<top (required)>'
56: from /usr/local/lib/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:65:in `require'
55: from /usr/local/lib/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:65:in `require'
54: from /var/lib/gems/2.5.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
53: from /var/lib/gems/2.5.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
52: from /var/lib/gems/2.5.0/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
51: from /var/lib/gems/2.5.0/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
50: from /var/lib/gems/2.5.0/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
49: from /var/lib/gems/2.5.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
48: from /var/lib/gems/2.5.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
47: from /home/sindibad/Documents/RailsApps/kpp/bin/rails:9:in `<top (required)>'
46: from /var/lib/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
45: from /var/lib/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
44: from /var/lib/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
43: from /var/lib/gems/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
42: from /var/lib/gems/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
41: from /var/lib/gems/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
40: from /var/lib/gems/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
39: from /var/lib/gems/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
38: from /var/lib/gems/2.5.0/gems/railties-5.2.3/lib/rails/commands.rb:18:in `<top (required)>'
37: from /var/lib/gems/2.5.0/gems/railties-5.2.3/lib/rails/command.rb:46:in `invoke'
36: from /var/lib/gems/2.5.0/gems/railties-5.2.3/lib/rails/command/base.rb:65:in `perform'
35: from /var/lib/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
34: from /var/lib/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
33: from /var/lib/gems/2.5.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
32: from /var/lib/gems/2.5.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:142:in `perform'
31: from /var/lib/gems/2.5.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:142:in `tap'
30: from /var/lib/gems/2.5.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:145:in `block in perform'
29: from /var/lib/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
28: from /var/lib/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
27: from /var/lib/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
26: from /var/lib/gems/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
25: from /var/lib/gems/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
24: from /var/lib/gems/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
23: from /var/lib/gems/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
22: from /var/lib/gems/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
21: from /home/sindibad/Documents/RailsApps/kpp/config/application.rb:7:in `<top (required)>'
20: from /var/lib/gems/2.5.0/gems/bundler-2.0.2/lib/bundler.rb:114:in `require'
19: from /var/lib/gems/2.5.0/gems/bundler-2.0.2/lib/bundler/runtime.rb:65:in `require'
18: from /var/lib/gems/2.5.0/gems/bundler-2.0.2/lib/bundler/runtime.rb:65:in `each'
17: from /var/lib/gems/2.5.0/gems/bundler-2.0.2/lib/bundler/runtime.rb:76:in `block in require'
16: from /var/lib/gems/2.5.0/gems/bundler-2.0.2/lib/bundler/runtime.rb:76:in `each'
15: from /var/lib/gems/2.5.0/gems/bundler-2.0.2/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
14: from /var/lib/gems/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
13: from /var/lib/gems/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
12: from /var/lib/gems/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
11: from /var/lib/gems/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
10: from /var/lib/gems/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
9: from /var/lib/gems/2.5.0/gems/sqlite3-1.4.1/lib/sqlite3.rb:2:in `<top (required)>'
8: from /var/lib/gems/2.5.0/gems/sqlite3-1.4.1/lib/sqlite3.rb:6:in `rescue in <top (required)>'
7: from /var/lib/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
6: from /var/lib/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
5: from /var/lib/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
4: from /var/lib/gems/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
3: from /var/lib/gems/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
2: from /var/lib/gems/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
1: from /var/lib/gems/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
/var/lib/gems/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require': /var/lib/gems/2.5.0/gems/sqlite3-1.4.1/lib/sqlite3/sqlite3_native.so: undefined symbol: sqlite3_column_database_name - /var/lib/gems/2.5.0/gems/sqlite3-1.4.1/lib/sqlite3/sqlite3_native.so (LoadError)
我希望服务器开始为第一个命令运行,并为第二个命令创建所需的文件。
答案 0 :(得分:0)
如果尚未安装NodeJS,请尝试安装它。
sudo apt-get install nodejs
如果您需要重新安装nodejs,可以按照以下链接中的步骤进行操作:
https://askubuntu.com/questions/786015/how-to-remove-nodejs-from-ubuntu-16-04