Error while executing gem errno enoent

Установка Ruby on Rails на Windows Помню один мой друг хотел попробовать Ruby on Rails, любитель всяких фрейворков. Но у него возникли проблемы с установкой, помниться долго парились. Но решение нашли. Проблема оказалась в том что имя пользователя в винде было на кириллице. Для тех кому интересно я решил написать небольшую инструкцию по всей […]

Содержание

  1. Установка Ruby on Rails на Windows
  2. ENOENT when updating from 2.7.6 to 2.7.7 #2375
  3. Comments
  4. Short Version
  5. System Information
  6. Details
  7. Установка Ruby on Rails на Windows
  8. ERROR: While executing gem . (Errno::EINVAL) Invalid argument #1726
  9. Comments
  10. Footer

Установка Ruby on Rails на Windows

Помню один мой друг хотел попробовать Ruby on Rails, любитель всяких фрейворков. Но у него возникли проблемы с установкой, помниться долго парились. Но решение нашли. Проблема оказалась в том что имя пользователя в винде было на кириллице.

Для тех кому интересно я решил написать небольшую инструкцию по всей установке, чтобы не париться как нам.

Итак, начнем.
1.Сначала нужен сам язык берем его здесь и устанавливаем, скажем в папку C:Ruby
2.Пропишем в PATHе(Компьютер-Свойства-Дополнительно-Переменные среды) путь к папке «bin» уже установленного Ruby. У меня он «C:Rubybin»
3.Теперь нам нужно установить sqlite и rails. Для этого идем по ссылке и скачиваем sqlite-shell-win32-x86-3070603.zip и sqlite-dll-win32-x86-3070603.zip
4.Извлекаем их содержимое и копируем их в ту же папку bin
5.Пробуем команды

>gem install sqlite3-ruby
>gem install rails

Если не выдало ошибки типа

ERROR: While executing gem… (Errno::ENOENT)
No such file or directory — «C:Documents and Settings. »

То идем к финишу.
6.Если же все-таки эта ошибка появилась, а меня она появилась то идем в нашу любимую bin-папку и открываем в блокноте файл gem.dat
изменяем его в таком виде:

ECHO OFF
SET _HOMEDRIVE=%HOMEDRIVE%
SET _HOMEPATH=%HOMEPATH%
SET HOMEDRIVE=С:
SET HOMEPATH=/Ruby
IF NOT «%

f0″ GOTO :WinNT
@«ruby.exe» «С:/Ruby/bin/gem» %1 %2 %3 %4 %5 %6 %7 %8 %9
GOTO :EOF
:WinNT
@«ruby.exe» «%

dpn0″ %*
SET HOMEDRIVE=%_HOMEDRIVE%
SET HOMEPATH=%_HOMEPATH%

где С:/Ruby/ это путь к нашему Ruby

7.Опять пробуем

>gem install sqlite3-ruby
>gem install rails

Должно сработать. Желаю удачи

Источник

ENOENT when updating from 2.7.6 to 2.7.7 #2375

UPDATE: Workaround: gem update —system —install-dir=/usr/local/share/gems —bindir /usr/local/bin

My current problem is upgrading RubyGems 2.7.6 to 2.7.7 results in an Errno::ENOENT error when attempting due to system-default —install-dir .

Short Version

  • Default gem flags for root, according to gem env , are —install-dir=/usr/local/share/gems —bindir /usr/local/bin .
  • sudo gem update —system expects /usr/share/gems/gems/rubygems-update-2.7.7 to exist.
  • sudo gem update —system actually puts it in /usr/local/share/gems/gems/rubygems-update-2.7.7 .
  • RubyGems thus fails to find it, and the entire upgrade fails.

I did not set this default, and I am unsure where my system is finding it.

System Information

  • Fedora 28
  • Ruby 2.5.1p57 (installed from the official repos)
  • RubyGems 2.7.6 (installed from the official repos)
  • No gemrc anywhere in /root or /etc.
  • No environment variables including the words RUBY or GEM .

Details

Output from the attempt:

It appears to originate in the Gem::Commands::UpdateCommand#install_rubygems function:

Lines 154 to 169 in 5971b48

def install_rubygems version # :nodoc:
args = update_rubygems_arguments
update_dir = File . join Gem . dir , ‘gems’ , «rubygems-update- # < version >«
Dir . chdir update_dir do
say «Installing RubyGems # < version >«
# Make sure old rubygems isn’t loaded
old = ENV [ «RUBYOPT» ]
ENV . delete ( «RUBYOPT» ) if old
installed = system Gem . ruby , ‘setup.rb’ , * args
say «RubyGems system software updated» if installed
ENV [ «RUBYOPT» ] = old if old
end
end

According to the error, it wants: /usr/share/gems/gems/rubygems-update-2.7.7
However, it winds up installing it to:

This issue is related to:

  • Network problems
  • Installing a library
  • Publishing a library
  • The command line gem
  • Other

Here are my current environment details:

I will abide by the code of conduct.

The text was updated successfully, but these errors were encountered:

Interesting. I did the same thing on Windows, except I did:

And I believe that worked. It’s an update script that I use when I want to reset my ruby installs. It works, so I’ve never tried gem update —system .

Looks like both Gem.paths and RbConfig::CONFIG include references to /usr/share/gems .

And, given that Gem.dir is just Gem.paths.home , that means it’s ultimately coming from Gem.paths .

Miscellaneous results from poking around in irb.

My other system updated fine. Summary of what I’ve found so far is below.

  • Fedora 27
  • Ruby 2.4.4p296
  • RubyGems 2.7.6 (installed 2.6.14 from the official repos, and updated previously using gem update —system )
  • Fedora 28
  • Ruby 2.5.1p57 (installed from the official repos)
  • RubyGems 2.7.6 (installed from the official repos)
  • Fedora releases.
  • Ruby versions.
  • Previously performing a successful upgrade using this method.

I did some more poking around.

Here’s a summary of what happens, as best as I can tell:

  1. The location of the file is dictated by Gem.dir , which is just a call to Gem.paths.home .
  2. Gem.paths.home is controlled by the GEM_HOME environment variable.
  3. When using sudo, GEM_HOME is unset, so it uses Gem.default_dir .
  4. On the system in question, Gem.default_dir does not exist.

And some notes regarding Gem.default_dir :

  1. RubyGems 2.7.6 + Ruby 2.5.1p57 on Fedora 28 exhibits this problem.
  2. RubyGems 2.7.6 + Ruby 2.4.4p296 on Fedora 27 does not exhibit this problem.
  3. There were no changes to Gem.default_dir between those versions.

Given all of this, my current suspicion is that the problem is caused by build flags Fedora uses or previously used for Ruby, and how those are exposed via RbConfig::CONFIG .

Also encountering an issue on this with RubyGems 2.7.6 + Ruby 2.5.3p105 on Fedora 29 when trying to upgrade to RubyGems 3.

I figured out a workaround!

As I mentioned in the original issue description, gem env says that for root the default gem flags are —install-dir=/usr/local/share/gems —bindir /usr/local/bin .

Passing those after gem update —system makes it work.

So, all I had to do is: gem update —system —install-dir=/usr/local/share/gems —bindir /usr/local/bin

As a note, —system causes the gem update command to split into a completely separate execution path.

  • Without —system : https://github.com/rubygems/rubygems/blob/master/lib/rubygems/commands/update_command.rb#L93-L119
  • With —system : https://github.com/rubygems/rubygems/blob/master/lib/rubygems/commands/update_command.rb#L239-L252

Upgrading to 3.0.3 just now, I had to do:

Same workaround, different directory.

I have no idea why. 🤷‍♀️

Closing since it seems you found a workaround

FYI: I had the same issue just now, updating to 3.0.3, on Fedora 29. The workaround posted by @duckinator on 3/29 worked for me.

While working on a different issue, I unintentionally found a testcase for this using Docker:

This:
docker run —rm -it fedora /bin/bash -c ‘dnf install -y ruby rubygems && gem update —system’

Results in this output (ignoring all the dnf-related output above it):

Whereas using my workaround above works:

docker run —rm -it fedora /bin/bash -c ‘dnf install -y ruby rubygems && gem update —system —install-dir=/usr/share/gems —bindir /usr/local/bin’

Источник

Установка Ruby on Rails на Windows

Помню один мой друг хотел попробовать Ruby on Rails, любитель всяких фрейворков. Но у него возникли проблемы с установкой, помниться долго парились. Но решение нашли. Проблема оказалась в том что имя пользователя в винде было на кириллице.

Для тех кому интересно я решил написать небольшую инструкцию по всей установке, чтобы не париться как нам.

Итак, начнем.
1.Сначала нужен сам язык берем его здесь и устанавливаем, скажем в папку C:Ruby
2.Пропишем в PATHе(Компьютер-Свойства-Дополнительно-Переменные среды) путь к папке «bin» уже установленного Ruby. У меня он «C:Rubybin»
3.Теперь нам нужно установить sqlite и rails. Для этого идем по ссылке и скачиваем sqlite-shell-win32-x86-3070603.zip и sqlite-dll-win32-x86-3070603.zip
4.Извлекаем их содержимое и копируем их в ту же папку bin
5.Пробуем команды

>gem install sqlite3-ruby
>gem install rails

Если не выдало ошибки типа

ERROR: While executing gem… (Errno::ENOENT)
No such file or directory — «C:Documents and Settings. »

То идем к финишу.
6.Если же все-таки эта ошибка появилась, а меня она появилась то идем в нашу любимую bin-папку и открываем в блокноте файл gem.dat
изменяем его в таком виде:

ECHO OFF
SET _HOMEDRIVE=%HOMEDRIVE%
SET _HOMEPATH=%HOMEPATH%
SET HOMEDRIVE=С:
SET HOMEPATH=/Ruby
IF NOT «%

f0″ GOTO :WinNT
@«ruby.exe» «С:/Ruby/bin/gem» %1 %2 %3 %4 %5 %6 %7 %8 %9
GOTO :EOF
:WinNT
@«ruby.exe» «%

dpn0″ %*
SET HOMEDRIVE=%_HOMEDRIVE%
SET HOMEPATH=%_HOMEPATH%

где С:/Ruby/ это путь к нашему Ruby

7.Опять пробуем

>gem install sqlite3-ruby
>gem install rails

Должно сработать. Желаю удачи

Источник

ERROR: While executing gem . (Errno::EINVAL) Invalid argument #1726

I’m having a problem with gem on mac os x 10.11.6.

My current problem is I am not able to install any gems.

This issue is related to:

  • [x ] The command line gem

Here are my current environment details:

  • mac os x 10.11.6
  • ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]

I will abide by the code of conduct.

The text was updated successfully, but these errors were encountered:

What is the output installing with —verbose —backtrace ? Thanks!

gem install xcodeproj —verbose —backtrace
ERROR: While executing gem . (Errno::EINVAL)
Invalid argument
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/resolv.rb:672:in ‘clock_gettime’
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/resolv.rb:672:in ‘request’
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/resolv.rb:531:in ‘block in fetch_resource’
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/resolv.rb:1103:in ‘block (3 levels) in resolv’
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/resolv.rb:1101:in ‘each’
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/resolv.rb:1101:in ‘block (2 levels) in resolv’
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/resolv.rb:1100:in ‘each’
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/resolv.rb:1100:in ‘block in resolv’
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/resolv.rb:1098:in ‘each’
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/resolv.rb:1098:in ‘resolv’
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/resolv.rb:522:in ‘fetch_resource’
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/resolv.rb:512:in ‘each_resource’
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/resolv.rb:493:in ‘getresource’
/usr/local/lib/ruby/site_ruby/2.3.0/rubygems/remote_fetcher.rb:105:in ‘api_endpoint’
/usr/local/lib/ruby/site_ruby/2.3.0/rubygems/source.rb:47:in ‘api_uri’
/usr/local/lib/ruby/site_ruby/2.3.0/rubygems/source.rb:86:in ‘dependency_resolver_set’
/usr/local/lib/ruby/site_ruby/2.3.0/rubygems/resolver/best_set.rb:24:in ‘block in pick_sets’
/usr/local/lib/ruby/site_ruby/2.3.0/rubygems/source_list.rb:98:in ‘each’
/usr/local/lib/ruby/site_ruby/2.3.0/rubygems/source_list.rb:98:in ‘each_source’
/usr/local/lib/ruby/site_ruby/2.3.0/rubygems/resolver/best_set.rb:23:in ‘pick_sets’
/usr/local/lib/ruby/site_ruby/2.3.0/rubygems/resolver/best_set.rb:29:in ‘find_all’
/usr/local/lib/ruby/site_ruby/2.3.0/rubygems/resolver/installer_set.rb:156:in ‘find_all’
/usr/local/lib/ruby/site_ruby/2.3.0/rubygems/resolver/installer_set.rb:55:in ‘add_always_install’
/usr/local/lib/ruby/site_ruby/2.3.0/rubygems/dependency_installer.rb:474:in ‘resolve_dependencies’
/usr/local/lib/ruby/site_ruby/2.3.0/rubygems/commands/install_command.rb:194:in ‘install_gem’
/usr/local/lib/ruby/site_ruby/2.3.0/rubygems/commands/install_command.rb:255:in ‘block in install_gems’
/usr/local/lib/ruby/site_ruby/2.3.0/rubygems/commands/install_command.rb:251:in ‘each’
/usr/local/lib/ruby/site_ruby/2.3.0/rubygems/commands/install_command.rb:251:in ‘install_gems’
/usr/local/lib/ruby/site_ruby/2.3.0/rubygems/commands/install_command.rb:158:in ‘execute’
/usr/local/lib/ruby/site_ruby/2.3.0/rubygems/command.rb:310:in ‘invoke_with_build_args’
/usr/local/lib/ruby/site_ruby/2.3.0/rubygems/command_manager.rb:169:in ‘process_args’
/usr/local/lib/ruby/site_ruby/2.3.0/rubygems/command_manager.rb:139:in ‘run’
/usr/local/lib/ruby/site_ruby/2.3.0/rubygems/gem_runner.rb:55:in ‘run’
/usr/local/bin/gem:21:in ‘

I’m having the same problem. For what it’s worth, I’m using Homebrew’s ruby, and the problem still occurs even after uninstalling and reinstalling it. I even tried installing gem manually from cloning this repo.

Upon further investigation, this appears to be related to (or a duplicate of) Homebrew/homebrew-core#5413

Same issue here. Is there a PR in the works?

As @josephfrazier has already mentioned https://github.com/Homebrew/homebrew-core/issues/5413 works pretty well for me. Just re-installed ruby via homebrew from source.

© 2023 GitHub, Inc.

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

Источник

Is this because of the empty GEM_HOME variable on Environment?
I couldn’t figure it out for hours..

➜  ~  gem install mysql
ERROR:  While executing gem ... (Errno::ENOENT)
    No such file or directory -
➜  ~  mysql --version
mysql  Ver 14.14 Distrib 5.7.10, for osx10.11 (x86_64) using  EditLine wrapper
➜  ~  gem install mysql2
Fetching: mysql2-0.4.2.gem (100%)
ERROR:  While executing gem ... (Errno::ENOENT)
    No such file or directory -
➜  ~  rvm info

system:

  system:
    uname:       "Darwin Seos-MacBook.local 15.0.0 Darwin Kernel Version 15.0.0: Sat Sep 19 15:53:46 PDT 2015; root:xnu-3247.10.11~1/RELEASE_X86_64 x86_64"
    system:      "osx/10.11/x86_64"
    bash:        "/bin/bash => GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin15)"
    zsh:         "/bin/zsh => zsh 5.0.8 (x86_64-apple-darwin15.0)"

  rvm:
    version:      "rvm 1.26.11 (latest) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]"
    updated:      "21 minutes 30 seconds ago"
    path:         "/Users/seoyoochan/.rvm"

  homes:
    gem:          "not set"
    ruby:         "not set"

  binaries:
    ruby:         "/usr/bin/ruby"
    irb:          "/usr/bin/irb"
    gem:          "/usr/bin/gem"
    rake:         "/usr/bin/rake"

  environment:
    PATH:         "/Users/seoyoochan/.rvm/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin:/Applications/Postgres.app/Contents/Versions/9.4/bin"
    GEM_HOME:     ""
    GEM_PATH:     ""
    MY_RUBY_HOME: ""
    IRBRC:        ""
    RUBYOPT:      ""
    gemset:       ""


➜  ~

asked Dec 17, 2015 at 10:11

seoyoochan's user avatar

3

Thanks for the comments guys, I just fixed it myself.

When i checked the version of gem, it was very old (probably 2.0.4)
trying to do gem update --system was also failed, so i added sudo.

sudo gem update --system did solve the issue.

answered Dec 17, 2015 at 12:44

seoyoochan's user avatar

seoyoochanseoyoochan

8123 gold badges14 silver badges28 bronze badges

I am installing the Beta Version of Rails using the tutorial below:
http://grigio.org/how_install_rails_3_0_beta_ubuntu_linux_step_step

However I came across an error thats not listed in the above tutorial!

@rubygems-1.3.6$ sudo gem install tzinfo builder memcache-client rack rack-test rack-mount erubis mail text-format thor bundler i18n sqlite3-ruby
Successfully installed tzinfo-0.3.22
Successfully installed builder-2.1.2
Successfully installed memcache-client-1.8.3
Successfully installed rack-1.1.0
Successfully installed rack-test-0.5.4
Successfully installed rack-mount-0.6.3
Successfully installed abstract-1.0.0
Successfully installed erubis-2.6.5
Successfully installed activesupport-2.3.8
Successfully installed mime-types-1.16
Successfully installed polyglot-0.3.1
Successfully installed treetop-1.4.8
Successfully installed mail-2.2.1
Successfully installed text-hyphen-1.0.0
Successfully installed text-format-1.0.0
Successfully installed thor-0.13.6
Successfully installed bundler-0.9.25
Successfully installed i18n-0.4.0
Building native extensions.  This could take a while...
Successfully installed sqlite3-ruby-1.2.5
19 gems installed
Installing ri documentation for tzinfo-0.3.22...
Installing ri documentation for builder-2.1.2...
Installing ri documentation for memcache-client-1.8.3...
Installing ri documentation for rack-1.1.0...
Installing ri documentation for rack-test-0.5.4...
Installing ri documentation for rack-mount-0.6.3...
Installing ri documentation for abstract-1.0.0...
Installing ri documentation for erubis-2.6.5...
Installing ri documentation for activesupport-2.3.8...
Installing ri documentation for mime-types-1.16...
Installing ri documentation for polyglot-0.3.1...
Installing ri documentation for treetop-1.4.8...
Installing ri documentation for mail-2.2.1...
Installing ri documentation for text-hyphen-1.0.0...
Installing ri documentation for text-format-1.0.0...
Installing ri documentation for thor-0.13.6...
Installing ri documentation for bundler-0.9.25...
Installing ri documentation for i18n-0.4.0...
Installing ri documentation for sqlite3-ruby-1.2.5...
Updating class cache with 89 classes...
Installing RDoc documentation for tzinfo-0.3.22...
Installing RDoc documentation for builder-2.1.2...
Installing RDoc documentation for memcache-client-1.8.3...
Installing RDoc documentation for rack-1.1.0...
Installing RDoc documentation for rack-test-0.5.4...
Installing RDoc documentation for rack-mount-0.6.3...
Installing RDoc documentation for abstract-1.0.0...
Installing RDoc documentation for erubis-2.6.5...
Installing RDoc documentation for activesupport-2.3.8...
Installing RDoc documentation for mime-types-1.16...
Installing RDoc documentation for polyglot-0.3.1...
Installing RDoc documentation for treetop-1.4.8...
Installing RDoc documentation for mail-2.2.1...
Installing RDoc documentation for text-hyphen-1.0.0...
Installing RDoc documentation for text-format-1.0.0...
Installing RDoc documentation for thor-0.13.6...
Installing RDoc documentation for bundler-0.9.25...
Installing RDoc documentation for i18n-0.4.0...
Installing RDoc documentation for sqlite3-ruby-1.2.5...
@rubygems-1.3.6$ sudo gem install rails --pre
Successfully installed i18n-0.3.7
Successfully installed activesupport-3.0.0.beta3
Successfully installed activemodel-3.0.0.beta3
Successfully installed actionpack-3.0.0.beta3
Successfully installed arel-0.3.3
Successfully installed activerecord-3.0.0.beta3
Successfully installed activeresource-3.0.0.beta3
Successfully installed actionmailer-3.0.0.beta3
Successfully installed rake-0.8.7
Successfully installed railties-3.0.0.beta3
Successfully installed rails-3.0.0.beta3
11 gems installed
Installing ri documentation for i18n-0.3.7...
Installing ri documentation for activesupport-3.0.0.beta3...
Installing ri documentation for activemodel-3.0.0.beta3...
Installing ri documentation for actionpack-3.0.0.beta3...
Installing ri documentation for arel-0.3.3...
Installing ri documentation for activerecord-3.0.0.beta3...
Installing ri documentation for activeresource-3.0.0.beta3...
Installing ri documentation for actionmailer-3.0.0.beta3...
Installing ri documentation for rake-0.8.7...
Installing ri documentation for railties-3.0.0.beta3...
Installing ri documentation for rails-3.0.0.beta3...
ERROR:  While executing gem ... (Errno::ENOENT)
    No such file or directory - lib

The simple solution to this is to create the lib directory.

sudo mkdir /usr/lib/ruby1.9.1/gems/1.9.1/gems/rails-3.0.0.beta3/lib

I have ruby 1.9.1 installed on my system. Please change the version (1.9.1 or -3.0.0.beta3) in the above to reflect your development environment.

Dog Day


  • #1

Just installed ruby on Windows 7. This is the error I get while running
‘update_rubygems’.

C:Rubybin>update_rubygems
RubyGems 1.4.2 installed
ERROR: While executing gem … (Errno::ENOENT)
No such file or directory — README

C:Rubybin>

C:Rubybin>ruby —version
ruby 1.9.1p430 (2010-08-16 revision 28998) [i386-mingw32]

C:Rubybin>gem —version
1.4.2

Advertisements

Phillip Gawlowski


  • #2

Just installed ruby on Windows 7. =A0This is the error I get while runnin= g
‘update_rubygems’.

C:Rubybin>update_rubygems
RubyGems 1.4.2 installed
ERROR: =A0While executing gem … (Errno::ENOENT)
=A0 =A0No such file or directory — README

C:Rubybin>

C:Rubybin>ruby —version
ruby 1.9.1p430 (2010-08-16 revision 28998) [i386-mingw32]

C:Rubybin>gem —version
1.4.2

You shouldn’t update the built-in RubyGems, anyway.

In case you want to break stuff:

gem update —system

is the correct syntax to update RubyGems.

—=20
Phillip Gawlowski

Though the folk I have met,
(Ah, how soon!) they forget
When I’ve moved on to some other place,
There may be one or two,
When I’ve played and passed through,
Who’ll remember my song or my face.

Advertisements

Quintus


  • #3

Am 26.01.2011 16:57, schrieb Dog Day:

Just installed ruby on Windows 7. This is the error I get while running
‘update_rubygems’.

C:Rubybin>update_rubygems
RubyGems 1.4.2 installed
ERROR: While executing gem … (Errno::ENOENT)
No such file or directory — README

C:Rubybin>

C:Rubybin>ruby —version
ruby 1.9.1p430 (2010-08-16 revision 28998) [i386-mingw32]

C:Rubybin>gem —version
1.4.2

You *did* read the prominent message on rubygems.org and Rubygem’s
release notes, did you?

—————————————
Ruby 1.9+ users should wait to upgrade
—————————————

Full information here:
http://blog.zenspider.com/2010/12/rubygems-version-140-has-been.html

Vale,
Marvin


January 27, 2017/



Guest User

Are you trying to build Ruby 2.4.0 or later, including the 2.4.0 preview releases? Are you doing it by installing with RVM? Are you seeing errors like the ones below?

Ruby (specifically Rubygems) now pulls code from repos with submodules. That requires an RVM change.

To fix it, some day you can upgrade to the latest RVM using «rvm get head». In the mean time, you can use older Rubygems. Don’t «rvm install ruby-head». Instead, «rvm install rubyhead —rubygems 2.6.6». Curious if it’s been long enough and you can use the latest Rubygems? See the rvm issue for it.

Once that issue is fixed, the correct fix should be «rvm get stable» instead of specifying a specific older RubyGems version for each Ruby installation.

Screenshot of the problem here - see below for cut-and-pasteable output.

Screenshot of the problem here — see below for cut-and-pasteable output.

rails_ruby_bench noah.gibbs$ rvm install ruby-head-nobu --url https://github.com/nobu/ruby.git --branch round-to-even
Checking requirements for osx.
Installing requirements for osx.
Updating system..............
Installing required packages: coreutils...
Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/noah.gibbs/.rvm/rubies/ruby-head-nobu, this may take a while depending on your cpu(s)...
HEAD is now at 61a7af5 add to: :nearest option
From https://github.com/nobu/ruby
 * branchround-to-even -> FETCH_HEAD
Current branch round-to-even is up to date.
git checkout round-to-even
Copying from repo to src path...
ruby-head-nobu - #autoreconf.
ruby-head-nobu - #configuring..................................................................
ruby-head-nobu - #post-configuration.
ruby-head-nobu - #compiling....................................................................................................
ruby-head-nobu - #installing.......
ruby-head-nobu - #making binaries executable..
ruby-head-nobu - #downloading rubygems-7d3b7063184c0de861d9f31285ee1e7357efde15
ruby-head-nobu - #extracting rubygems-7d3b7063184c0de861d9f31285ee1e7357efde15.....
ruby-head-nobu - #removing old rubygems.........
ruby-head-nobu - #installing rubygems-7d3b7063184c0de861d9f31285ee1e7357efde15.
Error running 'env GEM_HOME=/Users/noah.gibbs/.rvm/gems/ruby-head-nobu@global GEM_PATH= /Users/noah.gibbs/.rvm/rubies/ruby-head-nobu/bin/ruby -d /Users/noah.gibbs/.rvm/src/rubygems-7d3b7063184c0de861d9f31285ee1e7357efde15/setup.rb --no-document',
showing last 15 lines of /Users/noah.gibbs/.rvm/log/1479161946_ruby-head-nobu/rubygems.install.log
[2016-11-14 14:22:20] /Users/noah.gibbs/.rvm/rubies/ruby-head-nobu/bin/ruby
current path: /Users/noah.gibbs/.rvm/src/rubygems-7d3b7063184c0de861d9f31285ee1e7357efde15
GEM_HOME=/Users/noah.gibbs/.rvm/gems/ruby-2.3.1
PATH=/Users/noah.gibbs/.rvm/usr/bin:/usr/local/opt/coreutils/bin:/usr/local/opt/pkg-config/bin:/usr/local/opt/libtool/bin:/usr/local/opt/automake/bin:/usr/local/opt/autoconf/bin:/Users/noah.gibbs/.rvm/gems/ruby-2.3.1/bin:/Users/noah.gibbs/.rvm/gems/ruby-2.3.1@global/bin:/Users/noah.gibbs/.rvm/rubies/ruby-2.3.1/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/noah.gibbs/.rvm/bin:/Users/noah.gibbs/.rvm/bin
GEM_PATH=/Users/noah.gibbs/.rvm/gems/ruby-2.3.1:/Users/noah.gibbs/.rvm/gems/ruby-2.3.1@global
command(7): env GEM_HOME=/Users/noah.gibbs/.rvm/gems/ruby-head-nobu@global GEM_PATH= /Users/noah.gibbs/.rvm/rubies/ruby-head-nobu/bin/ruby -d /Users/noah.gibbs/.rvm/src/rubygems-7d3b7063184c0de861d9f31285ee1e7357efde15/setup.rb --no-document
Exception `LoadError' at /Users/noah.gibbs/.rvm/rubies/ruby-head-nobu/lib/ruby/2.4.0/rubygems.rb:1345 - cannot load such file -- rubygems/defaults/operating_system
Exception `LoadError' at /Users/noah.gibbs/.rvm/rubies/ruby-head-nobu/lib/ruby/2.4.0/rubygems.rb:1354 - cannot load such file -- rubygems/defaults/ruby
Exception `Gem::MissingSpecError' at /Users/noah.gibbs/.rvm/rubies/ruby-head-nobu/lib/ruby/2.4.0/rubygems/dependency.rb:308 - Gem::MissingSpecError
ERROR:While executing gem ... (Errno::ENOENT)
No such file or directory @ dir_chdir - bundler/lib

Понравилась статья? Поделить с друзьями:
  • Error while checking the serial number криптопро
  • Error while evaluating uicontrol callback матлаб
  • Error while calling mysql bin mysqld exe
  • Error while evaluating expression перевод
  • Error while burning bootloader