这是我第一次学习编码,第一次使用Linux,第一次使用stackeroverflow,所以我不知道它出错的地方是不是很明显。
我已遵循本指南https://gorails.com/setup/ubuntu/16.04,所有内容都按照指南的说法运行,直到我进入此部分:
运行bundle install --local /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in
require': cannot load such file -- bundler (LoadError) from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in
要求' 来自/usr/lib/ruby/vendor_ruby/rails/generators/app_base.rb:328:inbundle_command' from /usr/lib/ruby/vendor_ruby/rails/generators/app_base.rb:344:in
run_bundle' 来自(eval):1:run_bundle' from /usr/lib/ruby/vendor_ruby/thor/command.rb:27:in
运行' 来自/usr/lib/ruby/vendor_ruby/thor/invocation.rb:126:ininvoke_command' from /usr/lib/ruby/vendor_ruby/thor/invocation.rb:133:in
阻止invoke_all' 来自/usr/lib/ruby/vendor_ruby/thor/invocation.rb:133:ineach' from /usr/lib/ruby/vendor_ruby/thor/invocation.rb:133:in
map' 来自/usr/lib/ruby/vendor_ruby/thor/invocation.rb:133:ininvoke_all' from /usr/lib/ruby/vendor_ruby/thor/group.rb:232:in
发送' 来自/usr/lib/ruby/vendor_ruby/thor/base.rb:440:instart' from /usr/lib/ruby/vendor_ruby/rails/commands/application.rb:17:in
' 来自/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:inrequire' from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in
要求&#39; 来自/usr/lib/ruby/vendor_ruby/rails/cli.rb:14:in<top (required)>' from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in
要求&#39; 来自/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:inrequire' from /usr/bin/rails:9:in
&#39; tom @ Laptop:〜$ cd myapp tom @ Laptop:〜/ myapp $ rake db:create 耙子流产了! LoadError:无法加载此类文件 - bundler / setup /home/tom/myapp/config/boot.rb:3:in<top (required)>' /home/tom/myapp/config/application.rb:1:in
&#39; / home / tom / myapp / Rakefile:4:在<top (required)>' (See full trace by running task with --trace) tom@Laptop:~/myapp$ rails server /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in
中要求&#39;:无法加载此类文件 - bundler / setup(LoadError) 来自/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:inrequire' from /home/tom/myapp/config/boot.rb:3:in
&#39; 来自bin / rails:3:require_relative' from bin/rails:3:in
&#39;
抱歉,我不知道如何正确格式化。 当我访问localhost:3000时,我发现网络错误。
有谁知道如何解决这个问题?谢谢你的时间。
答案 0 :(得分:0)
试试gem install bundler
。之后在终端使用bundle install
。