Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Add magic encoding comment to generated files

#3746

I have a directory ~/Open\ Source where I keep my open source projects (I will now be removing the space after finding this bug). I went to get Rails 3 running and was failing at the gem bundle step referenced in Yehuda's blog post. The error was:

imac:rails3 dave$ gem bundle --only default
Calculating dependencies...
Cloning git repository at: git://github.com/rails/arel.git
ERROR:  While executing gem ... (Errno::ENOENT)
    No such file or directory - /Users/dave/Open Source/rails3/vendor/gems/ruby/1.9.1/dirs/arel

Moving the rails directory to /tmp and trying again resulted in everything working and installing.

Reported by Dave Myron · January 19th, 2010 @ 05:02 AM

State: invalid
Milestone: none
Assigned to: Jeremy Kemper Jeremy Kemper
Importance: Low

Activity

  1. StuFF mc
    StuFF mc
    • Tag changed from bundler to bundler, symlink
    • Assigned user set to Yehuda Katz (wycats)

    Just wanted to add a comment. I had the same problem and it turned out to be because my "Code" directory (where my Project directory resides) was a symlink to the "Code" directory on my other partition. I moved this code to a "real" directory on the HardDrive and it then works. Somehow symlink resolving bad :(

    June 10th, 2010 @ 01:50 PM

  2. StuFF mc
    StuFF mc

    Guys, as a side note, and because it was really hard to find, note that if you are running "bundle install" in Snow Leopard you might have to call

    env ARCHFLAGS="-arch x86_64" bundle install

    Otherwhise I had the mysql gem always spitting an Error! If there's anything related to that on the internet, explain it to the guy asking :) We spent a few hours on it today.

    June 10th, 2010 @ 04:54 PM

  3. DHH
    DHH
    • State changed from new to open
    • Assigned user changed from Yehuda Katz (wycats) to Carl Lerche

    June 10th, 2010 @ 04:57 PM

  4. Prem Sichanugrist (sikachu)
    Prem Sichanugrist (sikachu)
    • State changed from open to needs-more-info

    For the original problem, it does not apply anymore on beta4 with bundler 0.9.26 :-

    [~/Open Source/rails3] pwd
    /Users/sikachu/Open Source/rails3
    [~/Open Source/rails3] gem list | egrep rails\|bundler
    bundler (0.9.26)
    rails (3.0.0.beta4)
    [~/Open Source/rails3] bundle install
    Fetching source index from http://rubygems.org/
    Using rake (0.8.7) from system gems 
    Using abstract (1.0.0) from bundler gems 
    Using activesupport (3.0.0.beta4) from bundler gems 
    .
    .
    .
    Using thor (0.13.6) from bundler gems 
    Using railties (3.0.0.beta4) from bundler gems 
    Using rails (3.0.0.beta4) from bundler gems 
    Installing sqlite3-ruby (1.3.0) from rubygems repository at http://rubygems.org/ with native extensions 
    Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
    

    For the next problem about symlink, I cannot reproduce the problem. Could you provide more on the steps to produce the problem, as symlink works fine here :-

    [~] mkdir target
    [~] cd Open\ Source 
    [~/Open Source] ln -s ~/target target
    [~/Open Source] ls -l
    total 8
    lrwxr-xr-x  1 sikachu  staff  21 Jun 11 08:56 target -> /Users/sikachu/target
    [~/Open Source] cd target 
    [~/Open Source/target] rails new rails3
          create  
          create  README
          create  Rakefile
          create  config.ru
          .
          .
          .
          create  tmp/pids
          create  vendor/plugins
          create  vendor/plugins/.gitkeep
    [~/Open Source/target] bundle 
    [~/Open Source/target] cd rails3 
    [~/Open Source/target/rails3] bundle install
    Fetching source index from http://rubygems.org/
    Using rake (0.8.7) from system gems 
    Using abstract (1.0.0) from bundler gems 
    Using activesupport (3.0.0.beta4) from bundler gems 
    .
    .
    .
    Using railties (3.0.0.beta4) from bundler gems 
    Using rails (3.0.0.beta4) from bundler gems 
    Using sqlite3-ruby (1.3.0) from bundler gems 
    Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
    [~/Open Source/target/rails3]
    

    For the problem about MySQL gem installation, I don't think it's really related to bundler-rails, as if you're install the gem manually by gem install mysql, you would definitely have to do the same thing. My suggestion would be adding

    export ARCHFLAGS='-arch x86_64'
    

    into your .bashrc or .zshrc to act as the default. However, I'd love if it's going to be documented somewhere, though.

    (By the way, I think I got that I need the flag on my first installation by googled 'mysql gem snow leopard' though.)

    June 11th, 2010 @ 02:08 PM

  5. Santiago Pastorino
    Santiago Pastorino

    Can you Dave or Stuff try with the new bundler, rails and ruby please?.
    And tell us if the problem persist

    June 13th, 2010 @ 02:24 AM

  6. StuFF mc
    StuFF mc

    Prem, Santiago:

    • Regarding Bundler: I can't test (yet) on Rails3, and I think this should be fixed in 2.3.8 (or 2.3.9, whatever). That said, I should have the opportunity to test in Rails3 next week or so, but not with this project.
    • Regarding the Simlink, try Simlinking a directory containing a space in it, just like I did ("/Volumes/Macintosh HD/Code")
    • Regarding the export, good Idea, I added it.

    June 18th, 2010 @ 03:22 PM

  7. Prem Sichanugrist (sikachu)
    Prem Sichanugrist (sikachu)

    StuFF mc:

    Thank you for the response. The symlink that's failing is /Volumes/Macintosh HD/Code point to /Volumes/OtherVolume/Code right? And this is the regular mount, right?

    June 18th, 2010 @ 03:38 PM

  8. StuFF mc
    StuFF mc

    /Volumes/Snow HD/Code points to /Volumes/Macintosh HD/Code

    Regular mount?

    June 18th, 2010 @ 03:41 PM

  9. Prem Sichanugrist (sikachu)
    Prem Sichanugrist (sikachu)

    Sorry, just want to confirm that it's not pointing to NFS mount or something. Now I see the point ;)

    Somehow I tested it out by creating 2 disk images mounted to the /Volume. I don't see any problem with Bundler 0.9.26 and Rails 3.0.0.beta4.

    [~] cd /Volumes/Snow\ HD 
    [/Volumes/Snow HD] ln -s /Volumes/Macintosh\ HD/Code Code
    [/Volumes/Snow HD] ls -l
    total 8
    lrwxr-xr-x  1 sikachu  sikachu  26 Jun 18 21:56 Code -> /Volumes/Macintosh HD/Code
    [/Volumes/Snow HD] cd Code
    [/Volumes/Snow HD/Code] rails new rails3 
          create  
          create  README
          create  Rakefile
          create  config.ru
          .
          .
          .
          create  tmp/pids
          create  vendor/plugins
          create  vendor/plugins/.gitkeep
    [/Volumes/Snow HD/Code] cd rails3
    [/Volumes/Snow HD/Code/rails3] bundle install
    Fetching source index from http://rubygems.org/
    Using rake (0.8.7) from system gems 
    Using abstract (1.0.0) from bundler gems 
    Using activesupport (3.0.0.beta4) from bundler gems 
          .
          .
          . 
    Using railties (3.0.0.beta4) from bundler gems 
    Using rails (3.0.0.beta4) from bundler gems 
    Using sqlite3-ruby (1.3.0) from bundler gems 
    Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
    [/Volumes/Snow HD/Code/rails3]
    

    Am I testing it right?

    June 18th, 2010 @ 04:01 PM

  10. StuFF mc
    StuFF mc

    Again, I'm speaking about Rails 2.3, in this case 2.3.4, but I guess it would be the same in 2.3.8 - not speaking about Rails 3

    June 18th, 2010 @ 09:50 PM

  11. StuFF mc
    StuFF mc
    • Importance changed from to Low

    What's the status on this ticket? :-)

    September 6th, 2010 @ 05:49 PM

  12. Prem Sichanugrist (sikachu)
    Prem Sichanugrist (sikachu)
    • Assigned user changed from Carl Lerche to Prem Sichanugrist (sikachu)

    Hi,

    I've tested using Bundler 1.0.0 with Rails 2.3.9 and still cannot reproduce the problem. I was using the instruction from http://gembundler.com/rails23.html and path /Volumes/Snow HD/Code symlinked to /Volumes/Macintosh HD/Code as the above example. I can run both rails app_name and bundle install just fine.

    Do you still seeing this error? If so, I'd love to have a reproducible step.

    Thank you

    September 10th, 2010 @ 01:41 PM

  13. Ryan Bigg
    Ryan Bigg
    • Tag cleared.

    Automatic cleanup of spam.

    October 9th, 2010 @ 10:14 PM

  14. David Trasbo
    David Trasbo
    • State changed from needs-more-info to invalid

    If this is still an issue, please report it here: http://github.com/carlhuda/bundler/issues

    October 10th, 2010 @ 02:55 PM

  15. StuFF mc
    StuFF mc

    I don't think it's still an issue. I just checked with Bundler 1.0.2 and Rails 2.3.9 and it seems fine. I guess it was a bug in a previous Bundler version. I'll report it to carlhuda if I see it again, in the mean time, you may close this one :) Thanks for all the time invested!

    October 14th, 2010 @ 06:16 PM

  16. Jeff Kreeftmeijer
  17. bingbing
  18. bingbing