This project is read-only.


"igem install rails" fails


c:\dev\ironruby\Merlin\Main>igem install rails --include-dependencies
INFO: gem install -y is now default and will be removed
INFO: use --ignore-dependencies to install only the gems you list
ERROR: Error installing rails:
    attempt to install file into "test/fixtures/test/hello_world.erb~" under "C:/dev/ironruby/Me
Closed Apr 16, 2009 at 10:46 PM by sborde


jimmysch wrote Apr 10, 2009 at 3:40 AM

The file "hello_world.erb~" probably shouldn't be in Rails, as it's a emacs temporary file, but if Ruby loads it then we should ...

wrote Apr 10, 2009 at 1:40 PM

wrote Apr 10, 2009 at 5:38 PM

jirapong wrote Apr 10, 2009 at 8:15 PM

It should be something relate to rubygems compatibility that I'm working on. I will investigate further.
meanwhile, You should able to install with

igem i rails --version 2.1.0 --no-ri --no-rdoc�

jimmysch wrote Apr 10, 2009 at 9:01 PM

But installing a previous version is not a good work-around, and omitting ri/rdoc does not fix the issue with the latest version.

sborde wrote Apr 12, 2009 at 7:41 AM

The issue seems to be because File.expand_path changes case of "Lib" when the file name includes "~". Here is the ouput of IronRuby.
File.expand_path "c:/github/ironruby/Merlin/Main/bin/Debug/lib/Hello"
=> "c:/github/ironruby/Merlin/Main/bin/Debug/lib/Hello"
File.expand_path "c:/github/ironruby/Merlin/Main/bin/Debug/lib/Hello~"
=> "c:/github/ironruby/Merlin/Main/bin/Debug/Lib/Hello~"
This is the MRI output:

irb(main):005:0> File.expand_path "c:/github/ironruby/Merlin/Main/bin/Debug/lib/Hello"
=> "c:/github/ironruby/Merlin/Main/bin/Debug/lib/Hello"
irb(main):006:0> File.expand_path "c:/github/ironruby/Merlin/Main/bin/Debug/lib/Hello~"
=> "c:/github/ironruby/Merlin/Main/bin/Debug/lib/Hello~"

This affects the following code in the extract_files method in c:/github/ironruby/Merlin/External.LCA_RESTRICTED/Languages/Ruby/redist-libs/ruby/site_ruby/1.8/rubygems/installer.rb:
  if path !~ /\A#{Regexp.escape @gem_dir}/ then
    msg = "attempt to install file into %p under %p" %
            [entry['path'], @gem_dir]
    raise Gem::InstallError, msg
Adding /i to the regexp ("if path !~ /\A#{Regexp.escape @gem_dir}/i then") is a workaround for now

wrote Apr 16, 2009 at 10:46 PM

wrote May 20, 2009 at 9:54 PM

wrote Feb 22, 2013 at 12:40 AM

wrote May 16, 2013 at 12:05 PM