You are not logged in.
Pages: 1
I can't get the new Ruby to work. It's ruby 1.9.2 from Extra. Here is what I get when I run gem:
[root@xhkr ruby]# gem
/usr/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:68:in `installed_spec_directories': undefined method `path' for Gem:Module (NoMethodError)
from /usr/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:58:in `from_installed_gems'
from /usr/lib/ruby/site_ruby/1.9.1/rubygems.rb:883:in `source_index'
from /usr/lib/ruby/site_ruby/1.9.1/rubygems/gem_path_searcher.rb:81:in `init_gemspecs'
from /usr/lib/ruby/site_ruby/1.9.1/rubygems/gem_path_searcher.rb:13:in `initialize'
from /usr/lib/ruby/site_ruby/1.9.1/rubygems.rb:841:in `new'
from /usr/lib/ruby/site_ruby/1.9.1/rubygems.rb:841:in `block in searcher'
from <internal:prelude>:10:in `synchronize'
from /usr/lib/ruby/site_ruby/1.9.1/rubygems.rb:840:in `searcher'
from /usr/lib/ruby/site_ruby/1.9.1/rubygems.rb:479:in `find_files'
from /usr/lib/ruby/site_ruby/1.9.1/rubygems.rb:983:in `load_plugins'
from /usr/lib/ruby/site_ruby/1.9.1/rubygems.rb:1139:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from /usr/bin/gem:8:in `<main>'
I think the package is not correctly built, I don't understand why there is still 1.9.1 in the path.
I tried to remove the package, reinstall.. Same problem.
But with my PKGBUILD it works :
# $Id: PKGBUILD 84971 2010-07-06 01:35:46Z eric $
# Maintainer: Allan McRae <allan@archlinux.org>
# Contributor: John Proctor <jproctor@prium.net>
# Contributor: Jeramy Rutley <jrutley@gmail.com>
pkgname=('ruby' 'ruby-docs')
pkgver=1.9.2_p0
_pkgver=1.9.2-p0
_version=1.9.2
pkgrel=1
pkgdesc="An object-oriented language for quick and easy programming"
arch=('i686' 'x86_64')
url="http://www.ruby-lang.org/en/"
license=('custom')
makedepends=('gdbm' 'db' 'openssl' 'zlib' 'readline' 'tk')
options=('!emptydirs')
source=("ftp://ftp.ruby-lang.org/pub/ruby/1.9/${pkgname}-${_pkgver}.tar.bz2")
md5sums=('d8a02cadf57d2571cd4250e248ea7e4b')
sha1sums=('c0fc7e1047f1eac7e554e9818513593b0d398698')
build() {
cd "${srcdir}/${pkgname}-${_pkgver}"
# see http://cvs.fedoraproject.org/viewvc/rpms/ruby/devel/
#patch -p1 -i "${srcdir}/openssl-1.0.patch"
./configure --prefix=/usr --enable-shared --enable-pthread --with-ruby-version=${_version}
make
}
package_ruby()
{
depends=('gdbm' 'db' 'openssl' 'zlib' 'readline')
provides=('rubygems' 'rake')
conflicts=('rubygems' 'rake')
optdepends=('tk: for Ruby/TK')
cd "${srcdir}/${pkgname}-${_pkgver}"
make DESTDIR="${pkgdir}" install
install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}
package_ruby-docs()
{
pkgdesc="Documentation files for ruby"
#arch=('any')
depends=('ruby')
cd "${srcdir}/${pkgname}-${_pkgver}"
make -j1 DESTDIR="${pkgdir}" install-doc
install -Dm644 COPYING "${pkgdir}/usr/share/licenses/ruby-docs/COPYING"
}
The only difference is "--with-ruby-version=${_version}".
Has anyone the same problem with the pre-compiled package of Ruby ?
Edit : Working fine in my desktop box. So the Ruby from pacman is ok. Don't understand this strange behavior on my server. How can I remove *everything* from the ruby package, to try to reinstall it properly ?
Last edited by Rydgel (2010-09-06 08:18:46)
Offline
I see exactly the same problem. I'm guessing I'll need to install my gems again for 1.9.2, so I've just reverted back to 1.9.1 for now.
Offline
The path will continue to be 1.9.1 for the time being.
The info below comes from the 1.9.2 release announcement late last month.
http://blade.nagaokaut.ac.jp/cgi-bin/sc … alk/367983
== FAQ
:The standard library is installed in /usr/local/lib/ruby/1.9.1
This version number is "library compatibility version". Ruby 1.9.2 is
mostly compatible with the 1.9.2, so its library is installed in the
directory.
Regarding the error message, it's because Rubygems are now built into Ruby 1.9.
Try renaming the rubygems.rb file in site_ruby (/usr/lib/ruby/site_ruby/1.9.1/rubygems.rb) to rubygems.bak and try again.
This shouldn't affect your installed gems.
You could also fetch and build the latest version of Rubygems from GitHub.
http://github.com/rubygems/rubygems.git
Cheers!
Last edited by awkwood (2010-09-03 15:46:59)
Offline
Thanks awkwood, that solved the problem in my case.
Offline
Thanks mate, problem solved
Offline
Offline
Encountered this problem today, thank you very much for the solution :-)
Offline
Same problem here. Renaming didn't help though:
/usr/lib/ruby/site_ruby/1.9.1/rubygems/gem_runner.rb:14:in `<top (required)>': undefined method `load_env_plugins' for Gem:Module (NoMethodError)
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from /usr/bin/gem:9:in `<main>'
Keith
dotfiles
Offline
Offline
Hi awkwood,
I probably should have clarified things a little more: I actually do get the same error message as the original poster. For instance, when I try to update gem as you suggested I get:
sudo gem update --system
Password:
/usr/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:62:in `installed_spec_directories': undefined method `path' for Gem:Module (NoMethodError)
from /usr/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:52:in `from_installed_gems'
from /usr/lib/ruby/site_ruby/1.9.1/rubygems.rb:914:in `source_index'
from /usr/lib/ruby/site_ruby/1.9.1/rubygems/gem_path_searcher.rb:83:in `init_gemspecs'
from /usr/lib/ruby/site_ruby/1.9.1/rubygems/gem_path_searcher.rb:13:in `initialize'
from /usr/lib/ruby/site_ruby/1.9.1/rubygems.rb:873:in `new'
from /usr/lib/ruby/site_ruby/1.9.1/rubygems.rb:873:in `searcher'
from /usr/lib/ruby/site_ruby/1.9.1/rubygems.rb:495:in `find_files'
from /usr/lib/ruby/site_ruby/1.9.1/rubygems.rb:1034:in `load_plugins'
from /usr/lib/ruby/site_ruby/1.9.1/rubygems/gem_runner.rb:84:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from /usr/bin/gem:9:in `<main>'
When I tried using the above renaming fix, however, that is when I got the other error message in my above post.
I'm running ruby 1.9.2:
ruby -v
ruby 1.9.2p136 (2010-12-25 revision 30365) [i686-linux]
I'll try taking a look at the links you posted.
Thanks for the suggestions
Best,
Keith
Keith
dotfiles
Offline
I solved by using the following commands:
$ sudo pacman -U /var/cache/pacman/pkg/ruby-1.9.1_p429-1-x86_64.pkg.tar.xz [or equivalent 1.9.1 version]
$ sudo gem update --system
$ sudo pacman -S ruby [to return to the new ruby (1.9.2)]
Now everything seems to work fine.
Nicola
Offline
Pages: 1