I'm trying to change my ruby versions on Mac and even though it says its on the right ruby version (2.3.4), it still doesn't work.
我正在尝试在Mac上更改我的ruby版本,即使它在正确的ruby版本(2.3.4)上说它仍然不起作用。
Example output:
:~ my_username$ cd my_project_name
:my_project_name my_username$ which ruby
/Users/my_username/.rvm/rubies/ruby-2.3.4/bin/ruby
:my_project_name my_username$ ruby -v
ruby 2.3.4p301 (2017-03-30 revision 58214) [x86_64-darwin16]
:my_project_name my_username$ bundle install
Ignoring executable-hooks-1.3.2 because its extensions are not built. Try: gem pristine executable-hooks --version 1.3.2
Ignoring gem-wrappers-1.3.2 because its extensions are not built. Try: gem pristine gem-wrappers --version 1.3.2
Your Ruby version is 2.5.0, but your Gemfile specified 2.3.4
:my_project_name my_username$
And RVM list, and then attempting to bundle install for my project:
和RVM列表,然后尝试捆绑我的项目的安装:
:my_project_name my_username$ rvm list
rvm rubies
=* ruby-2.3.4 [ x86_64 ]
ruby-2.4.0 [ x86_64 ]
ruby-2.4.1 [ x86_64 ]
ruby-2.4.2 [ x86_64 ]
# => - current
# =* - current && default
# * - default
:my_project_name my_username$ bundle install
Ignoring executable-hooks-1.3.2 because its extensions are not built. Try: gem pristine executable-hooks --version 1.3.2
Ignoring gem-wrappers-1.3.2 because its extensions are not built. Try: gem pristine gem-wrappers --version 1.3.2
Your Ruby version is 2.5.0, but your Gemfile specified 2.3.4
:my_project_name my_username$
As you can see, I have both 2.3.4 installed and set to the current ruby version but it doesn't detect it in my directory. I've closed and retried several times in a new terminal window.
正如您所看到的,我安装了2.3.4并设置为当前的ruby版本,但它在我的目录中没有检测到它。我在一个新的终端窗口关闭并重试了几次。
1 个解决方案
#1
0
Looks like i had bundler installed before RVM was setup. Ran gem install bundler
and now I'm able to bundle install and everything works fine.
看起来我在安装RVM之前安装了bundler。 Ran gem install bundler现在我可以捆绑安装,一切正常。
#1
0
Looks like i had bundler installed before RVM was setup. Ran gem install bundler
and now I'm able to bundle install and everything works fine.
看起来我在安装RVM之前安装了bundler。 Ran gem install bundler现在我可以捆绑安装,一切正常。