设置我的旧英特尔苹果笔记本电脑运行ventura 13.4.1,尝试从头开始使用ruby-3.1.3创建一个全新的rails 7应用程序。我下载了最新的命令行工具。我运行gem install bundler --version 2.3.26 --default
得到
Successfully installed bundler-2.3.26 as a default gem
然后下一行
ERROR: While executing gem ... (Errno::ENOENT)
No such file or directory @ dir_chdir - /usr/local/lib/ruby/gems/3.2.0/specifications/gems/bundler-2.3.26
我运行gem install bundler
得到
Successfully installed bundler-2.4.19
Parsing documentation for bundler-2.4.19
Done installing documentation for bundler after 0 seconds
1 gem installed
我运行gem list bundler
得到
*** LOCAL GEMS ***
bundler (2.4.19, 2.3.26)
我运行bundler -v
,得到
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': Could not find 'bundler' (2.3.26) required by your /Users/kendallcarey/repos/broadway-blog/Gemfile.lock. (Gem::GemNotFoundException)
To update to the latest version installed on your system, run `bundle update --bundler`.
To install the missing version, run `gem install bundler:2.3.26`
我试过运行gem install bundler:2.3.26
很多次,这是我的Gemfile.lock中的版本。我甚至运行了gem update --system
,没有任何变化。如何让bundle install
工作?
1条答案
按热度按时间waxmsbnn1#
原来是Ruby版本。我能够在运行服务器的选项卡上运行bundle install,而新选项卡使用的是不同版本的ruby。