【发布时间】:2021-09-16 05:30:11
【问题描述】:
我正在尝试在 OpenAppAcademy 中开始学习 Ruby On Rails,但是当我在 18.04 Ubuntu rails console 的终端上运行时,我得到了
/var/lib/gems/2.5.0/gems/railties-6.1.4.1/lib/rails/app_loader.rb:53: warning: Insecure world writable dir /mnt/c in PATH, mode 040777
Traceback (most recent call last):
5: from bin/rails:3:in `<main>'
4: from bin/rails:3:in `load'
3: from /mnt/c/Users/RedmiBook/Desktop/projects/APPACADEMY/SQL/Active Record/Intro To Rails/bin/spring:10:in `<top (required)>'
2: from /mnt/c/Users/RedmiBook/Desktop/projects/APPACADEMY/SQL/Active Record/Intro To Rails/bin/spring:10:in `new'
1: from /usr/lib/ruby/vendor_ruby/bundler/lockfile_parser.rb:95:in `initialize'
/usr/lib/ruby/vendor_ruby/bundler/lockfile_parser.rb:108:in `warn_for_outdated_bundler_version': You must use Bundler 2 or greater with this lockfile. (Bundler::LockfileError)
我的捆绑器高于版本 2,所以我尝试sudo gem update --system
Installing RubyGems 3.2.27
Traceback (most recent call last):
3: from setup.rb:22:in <main>'
2: from setup.rb:22:in require'
1: from /var/lib/gems/2.5.0/gems/rubygems-update-3.2.27/lib/rubygems.rb:1328:in <top (required)>'
/var/lib/gems/2.5.0/gems/rubygems-update-3.2.27/lib/rubygems.rb:1341:in rescue in <top (required)>': uninitialized constant Gem::BasicSpecification (NameError)
Loading the rubygems/defaults/operating_system.rb file caused an error. This file is owned by your OS, not by rubygems upstream. Please find out which OS package this file belongs to and follow the guidelines from your OS to report the problem and ask for help.
我真的不知道从这里开始,很遗憾我不能开始使用 Rails。
【问题讨论】:
-
我显然是一个初学者,不要冒犯我,我愿意接受任何建设性的批评
-
gem list | grep bundler命令的输出是什么? -
捆绑器(2.2.27、2.2.24、2.2.21、1.16.1)
标签: ruby-on-rails ruby ruby-on-rails-5