The bounty expires tomorrow. Answers to this question are eligible for a +100 reputation bounty.
Kadaj13 wants to draw more attention to this question.
I am trying to make my personal website using github and jekyll following the instructions on the official website
When I reach the part:
jekyll new --skip-bundle
I received:
can't find gem jekyll (>= 0.a) with executable jekyll (Gem::GemNotFoundException)
I tried several approaches, such as the one mentioned here and I ran the command with sudo. Again after running jekyll new --skip-bundle .
Here is the terminal response after installing with instructions here
Fetching bundler-2.4.5.gem
Successfully installed bundler-2.4.5
Parsing documentation for bundler-2.4.5
Installing ri documentation for bundler-2.4.5
Done installing documentation for bundler after 0 seconds
1 gem installed
And here is the terminal response when I run jekyll new --skip-bundle again:
Traceback (most recent call last):
2: from /usr/local/bin/jekyll:22:in `<main>'
1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:262:in `bin_path'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': can't find gem jekyll (>= 0.a) with executable jekyll (Gem::GemNotFoundException)
I appreciate if you can help me how to solve it.
I use macOs.
Update:
I run bundle add jekyll and I received:
Your RubyGems version (3.0.3) has a bug that prevents `required_ruby_version` from working for Bundler. Any scripts that use `gem install bundler` will break as soon as Bundler drops support for your Ruby version. Please upgrade RubyGems to avoid future breakage and silence this warning by running `gem update --system 3.2.3
Could not locate Gemfile`
Then I run gem update --system 3.2.3
Updating rubygems-update
Fetching rubygems-update-3.2.3.gem
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.
Next step I run sudo gem update --system 3.2.3 and I received:
Updating rubygems-update
Fetching rubygems-update-3.2.3.gem
Successfully installed rubygems-update-3.2.3
Parsing documentation for rubygems-update-3.2.3
Installing ri documentation for rubygems-update-3.2.3
Installing darkfish documentation for rubygems-update-3.2.3
Done installing documentation for rubygems-update after 78 seconds
Parsing documentation for rubygems-update-3.2.3
Done installing documentation for rubygems-update after 0 seconds
Installing RubyGems 3.2.3
ERROR: While executing gem ... (Errno::EROFS)
Read-only file system # rb_sysopen - /usr/share/man/man1/bundle-platform.1
So still I failed to add jekyll....
System information:
Ruby: ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
Gem: 3.2.3
Bundler: version 2.4.6
Homebrew:
Homebrew 3.6.20
Homebrew/homebrew-core (git revision fc36a19edf4; last commit 2023-02-04)
Homebrew/homebrew-cask (git revision 4c5d3e2391; last commit 2023-02-04)
CPU: Darwin Kernel Version 19.6.0: Mon Aug 31 22:12:52 PDT 2020; root:xnu-6153.141.2~1/RELEASE_X86_64
Update 2:
Should I run these commands where my gem files are located?
I run gem environment and here is what I received. In which directory should I run these commands?
RubyGems Environment:
- RUBYGEMS VERSION: 3.2.3
- RUBY VERSION: 2.6.3 (2019-04-16 patchlevel 62) [universal.x86_64-darwin19]
- INSTALLATION DIRECTORY: /Library/Ruby/Gems/2.6.0
- USER INSTALLATION DIRECTORY: /Users/shirinvafaei/.gem/ruby/2.6.0
- RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
- GIT EXECUTABLE: /usr/local/bin/git
- EXECUTABLE DIRECTORY: /usr/bin
- SPEC CACHE DIRECTORY: /Users/shirinvafaei/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /Library/Ruby/Site
- RUBYGEMS PLATFORMS:
- ruby
- universal-darwin-19
- GEM PATHS:
- /Library/Ruby/Gems/2.6.0
- /Users/shirinvafaei/.gem/ruby/2.6.0
- /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /Users/shirinvafaei/.rbenv/shims
- /Users/shirinvafaei/.rbenv/bin
- /usr/local/Cellar/ruby/2.4.1_1/bin
- /usr/local/bin
- /Users/shirinvafaei/opt/anaconda3/bin
- /Users/shirinvafaei/opt/anaconda3/condabin
- /Library/Frameworks/Python.framework/Versions/2.7/bin
- /Library/Frameworks/Python.framework/Versions/3.8/bin
- /usr/local/bin
- /usr/bin
- /bin
- /usr/sbin
- /sbin
- /opt/X11/bin
Another update:
I tried
rben install 3.0.5
and I received this error message:
eb322180c6f18a6f74e4b6aa
Installing openssl-1.1.1s...
BUILD FAILED (Mac OS X 10.15.7 using ruby-build 20230202)
Inspect or clean up the working tree at /var/folders/yk/clm8vmf15r9cv4hghy2wm6380000gn/T/ruby-build.20230215141911.2345.jn3ObC
Results logged to /var/folders/yk/clm8vmf15r9cv4hghy2wm6380000gn/T/ruby-build.20230215141911.2345.log
Last 10 log lines:
_dgram_write in bss_dgram.o
_fd_write in bss_fd.o
_fd_puts in bss_fd.o
_sock_write in bss_sock.o
_sock_puts in bss_sock.o
(maybe you meant: _UI_method_get_writer, _RAND_write_file , _PEM_write_bio_PKCS7_stream , _PEM_write_X509_AUX , _PEM_write_PrivateKey , _PEM_write_bio_PrivateKey_traditional , _PEM_write_bio_PrivateKey , _PEM_write_PKCS8_PRIV_KEY_INFO , _PEM_write_bio_PKCS8_PRIV_KEY_INFO , _PEM_write_PKCS8PrivateKey , _PEM_write_bio_PKCS8PrivateKey , _PEM_write_bio , _PEM_X509_INFO_write_bio , _PEM_write_bio_PUBKEY , _PEM_write_DHparams , _PEM_write_EC_PUBKEY , _PEM_write_bio_EC_PUBKEY , _PEM_write_bio_ECPKParameters , _PEM_write_DSA_PUBKEY , _PEM_write_bio_RSA_PUBKEY , _PEM_write_RSAPublicKey , _PEM_write_PKCS7 , _PEM_write_bio_PKCS7 , _PEM_write_X509_CRL , _PEM_write_bio_X509_REQ_NEW , _PEM_write_X509_REQ , _PEM_write_bio_X509 , _PEM_write_PKCS8 , _PEM_write_DHxparams , _PEM_write_DSAparams , _PEM_write_ECPKParameters , _PEM_write_bio_RSAPrivateKey , _UI_method_set_writer , _PEM_write_bio_X509_AUX , _PEM_write_ECPrivateKey , _SMIME_write_CMS , _PEM_write_DSAPrivateKey , _PEM_write_X509 , _PEM_write , _PEM_write_bio_DSAPrivateKey , _PEM_write_bio_X509_CRL , _PEM_write_bio_NETSCAPE_CERT_SEQUENCE , _SMIME_write_PKCS7 , _PEM_ASN1_write , _PEM_ASN1_write_bio , _PEM_write_bio_CMS , _CRYPTO_THREAD_write_lock , _PEM_write_bio_DHxparams , _PEM_write_bio_DSAparams , _PEM_write_RSA_PUBKEY , _TXT_DB_write , _PEM_write_PUBKEY , _BIO_meth_set_write_ex , _BIO_meth_set_write , _BIO_meth_get_write , _PEM_write_bio_DSA_PUBKEY , _BIO_write_ex , _PEM_write_bio_X509_REQ , _PEM_write_bio_Parameters , _PEM_write_bio_ECPrivateKey , _PEM_write_bio_PKCS8 , _PEM_write_X509_REQ_NEW , _PEM_write_bio_DHparams , _BIO_ctrl_get_write_guarantee , _BIO_meth_get_write_ex , _PEM_write_bio_PKCS8PrivateKey_nid , _PEM_write_bio_ASN1_stream , _PEM_write_bio_CMS_stream , _BIO_write , _PEM_write_CMS , _PEM_write_RSAPrivateKey , _PEM_write_NETSCAPE_CERT_SEQUENCE , _PEM_write_PKCS8PrivateKey_nid , _SMIME_write_ASN1 , _PEM_write_bio_RSAPublicKey )
ld: symbol(s) not found for architecture x86_64
clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [libcrypto.dylib] Error 1
make: *** [all] Error 2
Do you know how can I fix this one?
Here is the terminal response after installing with instructions here
You are running this to install Bundler (You can think about it as the gem storage). And here you know that for the jekyll error code, it has the same issue (it is not finding the source to run jekyll). To fix this, install jekyll
If you want to run the jekyll from bundler, try this (recommended) Reference
bundle add jekyll #This will add jekyll to Gemfile (gem dependencies manager)
bundle install #This will check/install the gem from Gemfile
bundle exec jekyll #This will run jekyll from the bundle
If you don't want to use bundle, you can install the gem directly
gem install jekyll
jekyll #this should work and have message related to jekyll
Edit after update 1: (and posted reply to further debug things)
Basically, if you can do these (manual thing of the commands above)
Have Gemfile with gem "jekyll" line inside
can run bundle install and success, then you can proceed with the other jekyll related things.
Ruby 2.6 is the 2018 version and has reached end of life
I'd start by upgrading ruby to 3.0 or 3.1 (a lot of gems may not be compatible with 3.2 yet)
Read-only file system # rb_sysopen
Permission issue perhaps? Check if the directory is read only or root access only.
rbenv is a tool for managing ruby versions. You could consider installing ruby through rbenv instead of a plain system install. Would probably solve the permission problem as well.
I see several problems with your setup.
You are using an EOL version of Ruby that is no longer supported.
You are using a system installed ruby which requires root permissions to manage. Apart from security considerations, this creates further issues in gem maintenance.
Because you are forced to run gem install as superuser I don't think that the jekyll binary is set up correctly in the correct path. I think what may have happened is that paths or binaries were setup for the root user instead of your user, as a side effect of running with sudo.
What I recommend is installing a userspace Ruby version manager. My preferred is rbenv because if it's simplicity of operation, but there are others like RVM.
What this entails is:
Installing rbenv (it's quite simple - just follow their README).
Install a recent Ruby version that jekyll supports, like 3.0.5 via:
rbenv install 3.0.5
Run bundle install or gem install jekyll.
rbenv will setup your Ruby environment in userspace where sudo will not be required. All binaries should be correctly accessible in your path and your setup should now be working correctly.
P.S. You may have to restart your terminal session after installing rbenv and after installing the required Ruby version.
Related
I am trying to install fat free crm on a Windows 10 machine, but so far I have been unsuccessful. This is my latest attempt. Any help will be greatly appreciated.
Running bundler install gives me these messages:
Bundler 2.3.7 is running, but your lockfile was generated with 2.3.10. Installing Bundler 2.3.10 and restarting using that version.
Fetching gem metadata from https://rubygems.org/.
Fetching bundler 2.3.10
Installing bundler 2.3.10
Fetching gem metadata from https://rubygems.org/.........
Lots of successfully installed gems later:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/libv8-node-16.10.0.0/ext/libv8-node
C:/Ruby31-x64/bin/ruby.exe -I C:/Ruby31-x64/lib/ruby/3.1.0 -r
./siteconf20221119-16700-fgt0qd.rb extconf.rb
creating Makefile
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/libv8-node-16.10.0.0/ext/libv8-node/builder.rb:12:in
`build_libv8!': failed to download node 16.10.0 (Libv8::Node::BuilderError)
from
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/libv8-node-16.10.0.0/ext/libv8-node/location.rb:30:in
`install!'
from extconf.rb:9:in `<main>'
==== in
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/libv8-node-16.10.0.0/ext/libv8-node
==== running
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/libv8-node-16.10.0.0/libexec/download-node
extconf failed, exit code 1
My node version is v18.12.1, by the way. (Do I need an older one?)
Anyway, here is the exact sequence of actions before running bundler install inside my local git clone of fat_free_crm:
First, the repository I am using:
https://github.com/fatfreecrm/fat_free_crm
My Ruby version:
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x64-mingw-ucrt]
For a fresh start, I uninstall all gems, including rails:
gem uninstall -aIx
The latest commit on the bin folder says: Upgrade to Rails 6 so I install the latest rails 6 version on my machine:
gem install rails -v 6.1.7
I clone the repository from github:
git clone https://github.com/fatfreecrm/fat_free_crm.git
Since I am using sqlite3 for this, I comment out all other db gems in the Gemfile and only leave this one:
gem 'sqlite3', '~> 1.4.0'
Then, I copy database.sqlite.yml into database.yml.
Then, I run bundler install from within the directory fat_free_crm, which gives me this:
Ensure you have either installed the shared-mime-info package for your distribution, or
obtain a version of freedesktop.org.xml and set FREEDESKTOP_MIME_TYPES_PATH to the location of that file.
I (hopefully) solved that problem with this stackoverflow solution: Error installing ruby on rails on windows 10
Afterwards, I run bundler install again, which gives the error messages that I mentioned at the top of my description.
Any help will be greatly appreciated.
P.S.: I am trying to get back into Ruby on Rails after a long break, so please forgive me, if I made any stupid mistakes.
I am trying to update ruby gems by using:
gem update --system
But I am getting error:
ERROR: While executing gem ...(Gem::RemoteFetcher::UnknownHostError)
no such name (https://rubygems.org/specs.4.8.gz).
Unsure what version of rubygems you have installed, however there are three ways to fix:
network issues - try again later.
the version you have is bricked for updates, and you will need to install another way
NOTE: RubyGems 1.1 and 1.2 have problems upgrading when there is no rubygems-update installed. You will need to use the following instructions if you see Nothing to update. If you have an older version of RubyGems installed, then you can still do it in two steps:
$ gem install rubygems-update # might need to be admin/root
$ update_rubygems
Failing that you have to get your hands dirty:
Download from https://rubygems.org/pages/download
Unpack into a directory and cd there
Install with: ruby setup.rb (you may need admin/root privilege)
See https://rubygems.org/pages/download for more info
Trying to run ruby on my Windows 7 machine whenever i go to rails s or rake db:migrate i get the following error Cannot load such file bcrypt_ext.
My ruby version is 2.2.1 my rails version is 4.2.0 and the bcrypt version is 3.1.10. All the gems install correctly when i run bundle install however whenever i try to rake it gives me that error. Any help would be greatly appreciated
You need to use what it says here: https://www.alib.jp/entries/bcrypt_ext_load_error_on_ruby21x
C:\> gem install --no-ri --no-rdoc bcrypt
C:\> cd (path to gems root)\bcrypt-3.1.7-x86-mingw32\ext\mri
C:\(path to gems root)\bcrypt-3.1.7-x86-mingw32\ext\mri> ruby extconf.rb
C:\(path to gems root)\bcrypt-3.1.7-x86-mingw32\ext\mri> make
C:\(path to gems root)\bcrypt-3.1.7-x86-mingw32\ext\mri> make install
I meet the same problem in Window 8.1 64bit , Ruby 2.3.3 64bit , Rails 4.2.10.
My quick solution :
Step 1 : Remove all bcrypt in gem : gem uninstall bcrypt ( choose option 3 if existed (remove all))
Step 2 : Install bcrypt again : gem install bcrypt
Then check version of bcrypt : gem list bcrypt
Step 3 : In Gemfile of your project, add : gem 'bcrypt', '3.1.11', platforms: [:ruby, :x64_mingw]
notice : change the suitable version of your bcrypt (my version : 3.1.11)
Step 4 : Run command in the path of your project : bundle install
Step 5 : Remove the unneeded bcrypt :
Run command : gem uninstall bcrypt
You can see some version of bcrypt , you should keep one version : bcrypt-[your-version] . (Remove all version : bcrypt-[your-version]-x64-mingw32 . In mycase , remove : bcrypt-3.1.11-x64-mingw32)
Restart Rails sever , done
I think this proplem because when we install bcrypt , we didn't specify 64bit or 32bit , it is not compatible with window or ruby ( 64bit or 32bit )
For Windows 10, bcrypt 3.1.11 now works, checked in 24144
steps:
shut down all rails servers
uninstall all versions of bcrypt
manually install v3.1.1 (gem install bcrypt -v '3.1.11')
update gem files of projects
current versions
ruby 2.2.4p230 (2015-12-16 revision 53155) [i386-mingw32]
OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.10586 N/A Build 10586
The dirty quick workaround is to install the mri version with
gem install bcrypt --platform=ruby
worked for me.
Fetching: bcrypt-3.1.11.gem (100%)
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
Successfully installed bcrypt-3.1.11
source:
topac commented on Apr 17, 2015
https://github.com/codahale/bcrypt-ruby/issues/116
Rich Peck solution worked for me with a small update. Make sure the devkit is included in the environment path.(Check it by typing path in the command prompt) If its not included,you need to add the devkit/bin and devkit/mingw/bin paths to your PATH var.
Otherwise - make: x86_64-w64-mingw32-gcc: Command not found - error will be thrown while you make the file.
Once the error is fixed, then i am able to make the file and the bcrypt_ext issue is solved.
Most likely the compiled gem binaries don't contain binaries for Ruby 2.2.1. This is because there is a problem with cross-compiling Ruby with a Windows target. See this answer for more details.
The best alternative is to downgrade to Ruby 2.1.5.
You can try to compile the gem yourself, but that's a totally different beast. In some cases, like nokogiri, it's not even possible.
Using ubuntu 10.04, rvm. At first, I've installed ruby 1.9.2 with rvm, gem rails and generated some new project and started it successfully. Everything was working fine. But after changing to another project, executing bundle install command (output looks OK) and starting rails server - error occurs:
rails s
/home/jacek/.rvm/rubies/ruby-1.9.2-p318/lib/ruby/site_ruby/1.9.1/rubygems.rb:316:in `bin_path': can't find gem rails ([">= 0"]) with executable rails (Gem::GemNotFoundException)
from /home/jacek/.rvm/gems/ruby-1.9.2-p318/bin/rails:19:in `<main>'
gem list rails
*** LOCAL GEMS ***
rails (3.2.2)
gem env
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.18
- RUBY VERSION: 1.9.2 (2012-02-14 patchlevel 318) [i686-linux]
- INSTALLATION DIRECTORY: /home/jacek/.rvm/gems/ruby-1.9.2-p318
- RUBY EXECUTABLE: /home/jacek/.rvm/rubies/ruby-1.9.2-p318/bin/ruby
- EXECUTABLE DIRECTORY: /home/jacek/.rvm/gems/ruby-1.9.2-p318/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- GEM PATHS:
- /home/jacek/.rvm/gems/ruby-1.9.2-p318
- /home/jacek/.rvm/gems/ruby-1.9.2-p318#global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
My Path (includes EXECUTABLE DIRECTORY: /home/jacek/.rvm/gems/ruby-1.9.2-p318/bin )
/home/jacek/.rvm/gems/ruby-1.9.2-p318/bin:/home/jacek/.rvm/gems/ruby-1.9.2-p318#global/bin:/home/jacek/.rvm/rubies/ruby-1.9.2-p318/bin:/home/jacek/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
I would be grateful for any help
For me just installed bundler. This makes everything work again.
gem install bundler --no-ri --no-rdoc
If you use the command bundle install to install your gems off of a GEMFILE, it will install the gems into your default system location for gems, as outlined in the bundler docs here. After that, you can use bundlers bundle exec command to execute a command in the context of the bundle, as outlined in the docs here. This will ensure that the version of the gem you installed using bundle install is executed.
If you look at the homepage for bundler, which provides an overview of the docs, it states the following:
In some cases, running executables without bundle exec may work, if the executable happens to be installed in your system and does not pull in any gems that conflict with your bundle.
However, this is unreliable and is the source of considerable pain. Even if it looks like it works, it may not work in the future or on another machine.
I'm guessing that you run gem which rails in your console, and then run bundle show rails in your console, the default installed rails installation for your system differs from the one installed for your bundle.
You say that you are using rvm for your ruby and gem management. I'm thinking you may not have properly configured it. Trying executing the rvm notes command in your console to ensure that you have addressed all of the required/recommended steps for installation on your OS. You want to ensure that the executables for rvm are the first things included in your path when you run echo $PATH ideally. This will ensure that the gems installed for rvm will be the ones executed when you try executing them without prefixing bundle exec. If rvm notes doesn't give you the hints necessary to accomplish that, then try carefully reviewing the docs for installation on the RVM website.
You can switch version between Ruby with $ rvm use --default 2.4.0 for example
But for your problem try this :
$ gem install bundler
$ gem install rails
Hope it helps !
I think below command will work
gem pristine rails
issue => can't find gem rails - Gem::GemNotFoundException
Solution for Mac M1 Chip
Remove Gemfile.lock
run rm Gemfile.lock
run bundle install
run pod update && pod install
I'm having difficulties updating RubyGems from version 1.1.1 to newest. I've tried the following:
gem update
Result:
Updating installed gems
Bulk updating Gem source index for: http://gems.rubyforge.org/
Nothing to update
and
gem install rubygems-update
Result:
Bulk updating Gem source index for: http://gems.rubyforge.org/
Bulk updating Gem source index for: http://gems.rubyforge.org/
ERROR: Error installing rubygems-update:
rubygems-update requires builder (>= 0)
and
gem install rubygems-update update_rubygems
Result:
Bulk updating Gem source index for: http://gems.rubyforge.org/
Bulk updating Gem source index for: http://gems.rubyforge.org/
ERROR: Error installing rubygems-update:
rubygems-update requires builder (>= 0)
ERROR: could not find update_rubygems locally or in a repository
Then I checked, as suggested by theIV on a similar question, whether I had http://gems.rubyforge.org/ in my remote sources. Here's the gems environment:
RubyGems Environment:
- RUBYGEMS VERSION: 1.1.1
- RUBY VERSION: 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0]
- INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8
- RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
- RUBYGEMS PLATFORMS:
- ruby
- universal-darwin-9
- GEM PATHS:
- /Library/Ruby/Gems/1.8
- /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://gems.rubyforge.org
So, yeah, any ideas?
There is no need to take such drastic steps as completely rebuilding Ruby, reinstalling Rubygems from scratch or installing a version manager to solve this problem. There is simply a dependency cycle introduced by the release of hoe 2.3.0:
rubygems-update 1.3.5 requires (among other things) hoe-seattlerb
hoe-seattlerb requires hoe >= 2.3.0
hoe >= 2.3.0 requires rubygems >= 1.3.1
I wrote the blog post linked to by zipizap. To recap:
If you've already tried to update, uninstall the latest rubygems-update first: sudo gem uninstall rubygems-update -v 1.3.5
Update to 1.3.0: sudo gem install rubygems-update -v 1.3.0
sudo update_rubygems
Then update to latest: sudo gem update --system
With the release of Rubygems 1.3.6, it looks like this problem may be gone. From the release notes:
Development deps are no longer added to rubygems-update gem so older
versions can update sucessfully.
Oi - I feel your pain. I'll first ask the obvious; Have you been executing the commands with sudo? So you'll use sudo gem install rubygems-update and sudo update_rubygems.
If that doesn't work, download gems source again and rebuild from scratch (may want to erase prior source download, etc). You may want to read HiveLogic article on installing Ruby, RubyGems, etc on Mac OS Snow Leopard.
If that doesnt' work... :) I might do the drastic and rebuild Ruby as well.
Similar problem, different solution
$ sudo gem install rubygems-update update_rubygems
Updating metadata for 1 gems from gems.rubyforge.org/
.
complete
ERROR: Error installing rubygems-update:
rubygems-update requires builder (>= 0)
ERROR: could not find update_rubygems locally or in a repository
and
$ sudo gem update --system
ERROR: While executing gem ... (RuntimeError)
gem update --system is disabled on Debian. RubyGems can be updated using the official Debian repositories by aptitude or apt-get.
My solution:
Go to http://docs.rubygems.org/read/chapter/3#page13
and install manually, i.e. get the rubygems.... tgz and install it.
Hope it helps someone.
Any luck with gem install builder? That looks to be what you need to get rubygems-update to install.
I ran into a similar issue, and I was able to upgrade by doing this:
sudo gem update --system
The problem seems to be detected and reported as a dependecy-cycle: some new-version-dependencies are needed in order to install the new-gems-version... yes, it is a mess.The recomended solution I've seen is to make the upgrade in a step-by-step intermediate version fashion, in order to make the upgrade transition smooth, with small version-gaps.
Read it in this article, which explains it very well:
link text
After reading it and trying a couple of times, I've seen that it was still very fuzzy/complicated.
So I went for another solution, which installs more then necesary but is more straighforward:
Install a more recent version of ruby + irb + rdoc + gem (side by side with old version already existing)
Now install the gem "Ruby Version Manager" (a no pain in debian/ubuntu, it can compile latest ruby version) link text
Use RVM to install the final and latest ruby version (side-by-side again) and maintain it updated.
(you could now use RVM to uninstall the older versions of ruby/gems in your system, and only keept the latest ruby version)
If you need it for a production system, RVM is already seen as mature enough to maintain ruby/gems updated with newer versions.
Hope it helps some starter like me to "get toubles out of the way"
NOTE: RubyGems 1.1 and 1.2 have problems upgrading when there is no rubygems-update installed. You will need to use the following instructions if you see Nothing to update. If you have an older version of RubyGems installed, then you can still do it in two steps:
$ gem install rubygems-update # again, might need to be admin/root
$ update_rubygems # ... here too
Re-build it from the sources.