I would consider this an edge-case, especially because it is easily fixed by supplying an empty file named "rubygems.rb" somewhere inside the load-path, essentially turning `require 'rubygems'` into a noop.
The real "problem" in this is the fact that rubygems also provides the only common way of expressing a dependency via the `gem` method, which would then break. So, either we had a generic, gem-independent way of expressing "i want to require library X in version Y" (which we don't have) or the library maintainer would not be allowed to use gem - possibly breaking the library silently in a multitude of setups. I think it is a library responsibility to express the environment in which it is able to run.
I guess this status quo is okay.
Regards,
Florian Gilcher
···
On Jun 9, 2009, at 10:05 AM, Marcin Raczkowski wrote:
Old discusion. But my 2$
If you deploy to for example boxed environment, or host that does have ruby but don't have rubygems, or project requires that all dependencies (gems in this case) be unpacked and stored in svn/git. You might find that his little `require 'rubygems'` suddenly breaks application deployed into production.
It's a host responsibility to provide library, whatever way it sees fit - rubygems is just one option.
Hi! It should be working now. I accidentally messed up the gem spec
platform string. I've uploaded a new gem to rubyforge, and was able to
install it on windows.
c:\>gem install nokogiri
Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
c:\>gem install nokogiri --platform=mswin32
Successfully installed nokogiri-1.3.0-x86-mswin32
1 gem installed
Installing ri documentation for nokogiri-1.3.0-x86-mswin32...
Updating class cache with 2372 classes...
Installing RDoc documentation for nokogiri-1.3.0-x86-mswin32...
c:\>irb
irb(main):001:0> require 'nokogiri'
LoadError: 127: -
c:/ruby/lib/ruby/gems/1.9.1/gems/nokogiri-1.3.0-x86-mswin32/lib/nokogiri/1.9/nokogiri.so
from
c:/ruby/lib/ruby/gems/1.9.1/gems/nokogiri-1.3.0-x86-mswin32/lib/nokogiri/nokogiri.rb:1:in
`require'
from
c:/ruby/lib/ruby/gems/1.9.1/gems/nokogiri-1.3.0-x86-mswin32/lib/nokogiri/nokogiri.rb:1:in
`<top (required)>'
from
c:/ruby/lib/ruby/gems/1.9.1/gems/nokogiri-1.3.0/lib/nokogiri.rb:12:in
`require'
from
c:/ruby/lib/ruby/gems/1.9.1/gems/nokogiri-1.3.0/lib/nokogiri.rb:12:in
`<top (required)>'
from (irb):1:in `require'
from (irb):1
from c:/ruby/bin/irb.bat:20:in `<main>'
irb(main):002:0>
I have localized Windows so I can't send exact message in a popup window
but there was something like:
Input point of the procedure DllMain@12 hasn't succeeded find the
dynamic library msvcrt-ruby191.dll.
I think there is conflict between mingw and mswin version of Ruby.
Can you point me to the 1.9.1 version you installed? I will install it
and see if I can debug it. Nokogiri is cross compiled with mingw, so
I'm surprised it isn't working.
···
On Tue, Jun 02, 2009 at 01:51:22AM +0900, Iii Iii wrote:
> Hi! It should be working now. I accidentally messed up the gem spec
> platform string. I've uploaded a new gem to rubyforge, and was able to
> install it on windows.
>
> Let me know how this one works out!
c:\>gem install nokogiri
Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
c:\>gem install nokogiri --platform=mswin32
Successfully installed nokogiri-1.3.0-x86-mswin32
1 gem installed
Installing ri documentation for nokogiri-1.3.0-x86-mswin32...
Updating class cache with 2372 classes...
Installing RDoc documentation for nokogiri-1.3.0-x86-mswin32...
c:\>irb
irb(main):001:0> require 'nokogiri'
LoadError: 127: -
c:/ruby/lib/ruby/gems/1.9.1/gems/nokogiri-1.3.0-x86-mswin32/lib/nokogiri/1.9/nokogiri.so
from
c:/ruby/lib/ruby/gems/1.9.1/gems/nokogiri-1.3.0-x86-mswin32/lib/nokogiri/nokogiri.rb:1:in
`require'
from
c:/ruby/lib/ruby/gems/1.9.1/gems/nokogiri-1.3.0-x86-mswin32/lib/nokogiri/nokogiri.rb:1:in
`<top (required)>'
from
c:/ruby/lib/ruby/gems/1.9.1/gems/nokogiri-1.3.0/lib/nokogiri.rb:12:in
`require'
from
c:/ruby/lib/ruby/gems/1.9.1/gems/nokogiri-1.3.0/lib/nokogiri.rb:12:in
`<top (required)>'
from (irb):1:in `require'
from (irb):1
from c:/ruby/bin/irb.bat:20:in `<main>'
irb(main):002:0>
I have localized Windows so I can't send exact message in a popup window
but there was something like:
Input point of the procedure DllMain@12 hasn't succeeded find the
dynamic library msvcrt-ruby191.dll.
I think there is conflict between mingw and mswin version of Ruby.
Can you point me to the 1.9.1 version you installed? I will install it
and see if I can debug it. Nokogiri is cross compiled with mingw, so
I'm surprised it isn't working.
Of course, I posted it in the previous post but here it's again
Can you point me to the 1.9.1 version you installed? I will install it
and see if I can debug it. Nokogiri is cross compiled with mingw, so
I'm surprised it isn't working.
Of course, I posted it in the previous post but here it's again
Interesting.
For me it works fine with mingw 1.8.6, and with mingw 1.9.1:
ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-mingw32]
c:\>gem install nokogiri --platform=mswin32
C:\>irb
irb(main):001:0> require 'nokogiri'
LoadError: no such file to load -- nokogiri/native
from
c:/ruby/lib/ruby/gems/1.9.1/gems/nokogiri-1.2.3/lib/nokogiri.rb:6:in
`require'
from
c:/ruby/lib/ruby/gems/1.9.1/gems/nokogiri-1.2.3/lib/nokogiri.rb:6:in
`<top (required)>'
from (irb):1:in `require'
from (irb):1
from c:/ruby/bin/irb:12:in `<main>'
No, I mean where did you get it? I would like to download what you
have.
Sorry if this is an obvious question, but I don't develop on windows and
I want to make sure I'm running the exact same thing you are.
···
On Tue, Jun 02, 2009 at 02:30:07AM +0900, Iii Iii wrote:
> Can you point me to the 1.9.1 version you installed? I will install it
> and see if I can debug it. Nokogiri is cross compiled with mingw, so
> I'm surprised it isn't working.
Of course, I posted it in the previous post but here it's again
I think I've got it working now. The issue is that I was cross
compiling and testing against 1.9.1-p0. I've updated to 1.9.1-p129 and
things seem to be working now:
On Tue, Jun 02, 2009 at 03:53:22AM +0900, Iii Iii wrote:
>
> No, I mean where did you get it? I would like to download what you
> have.
>
> Sorry if this is an obvious question, but I don't develop on windows and
> I want to make sure I'm running the exact same thing you are.
I'm sorry for it, I compiled own version using Rubyinstaller: GitHub - oneclick/rubyinstaller: RubyInstaller for Windows - Build recipes
I think I've got it working now. The issue is that I was cross
compiling and testing against 1.9.1-p0. I've updated to 1.9.1-p129 and
things seem to be working now:
I think I've got it working now. The issue is that I was cross
compiling and testing against 1.9.1-p0. I've updated to 1.9.1-p129 and
things seem to be working now:
In theory and based on Ruby-core comments, 1.9.1-p0 should not differ
at the binary level from p129. So if the cross compilation is failing,
something smell funny over there and I need to review once again rake-
compiler.
Will be weird to require a new release of binaries every time a new
patchlevel of RUby gets out.
Life isn't easy...
···
On Jun 1, 6:19 pm, Aaron Patterson <aa...@tenderlovemaking.com> wrote:
On Tue, Jun 02, 2009 at 03:53:22AM +0900, Iii Iii wrote:
> > No, I mean where did you get it? I would like to download what you
> > have.
> > Sorry if this is an obvious question, but I don't develop on windows and
> > I want to make sure I'm running the exact same thing you are.
> I'm sorry for it, I compiled own version using Rubyinstaller:
>http://github.com/oneclick/rubyinstaller/tree/master
I think I've got it working now. The issue is that I was cross
compiling and testing against 1.9.1-p0. I've updated to 1.9.1-p129 and
things seem to be working now: