Ubuntu,Ruby,Ruby on Rails安装问题(访问localhost:3000)

时间:2016-11-05 09:33:31

标签: ruby-on-rails ruby linux ruby-on-rails-3 ubuntu

这是我第一次学习编码,第一次使用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要求&#39;       来自/usr/lib/ruby/vendor_ruby/rails/generators/app_base.rb:328:in bundle_command' from /usr/lib/ruby/vendor_ruby/rails/generators/app_base.rb:344:in run_bundle&#39;       来自(eval):1:run_bundle' from /usr/lib/ruby/vendor_ruby/thor/command.rb:27:in运行&#39;       来自/usr/lib/ruby/vendor_ruby/thor/invocation.rb:126:in invoke_command' from /usr/lib/ruby/vendor_ruby/thor/invocation.rb:133:in阻止invoke_all&#39;       来自/usr/lib/ruby/vendor_ruby/thor/invocation.rb:133:in each' from /usr/lib/ruby/vendor_ruby/thor/invocation.rb:133:in map&#39;       来自/usr/lib/ruby/vendor_ruby/thor/invocation.rb:133:in invoke_all' from /usr/lib/ruby/vendor_ruby/thor/group.rb:232:in发送&#39;       来自/usr/lib/ruby/vendor_ruby/thor/base.rb:440:in start' from /usr/lib/ruby/vendor_ruby/rails/commands/application.rb:17:in&#39;       来自/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require' 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:in require' 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:in require' from /home/tom/myapp/config/boot.rb:3:in&#39;       来自bin / rails:3:require_relative' from bin/rails:3:in&#39;

抱歉,我不知道如何正确格式化。 当我访问localhost:3000时,我发现网络错误。

有谁知道如何解决这个问题?谢谢你的时间。

1 个答案:

答案 0 :(得分:0)

试试gem install bundler。之后在终端使用bundle install