This project is archived and is in readonly mode.

#3746 ✓invalid
Dave Myron

Add magic encoding comment to generated files

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

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.

Comments and changes to this ticket

  • StuFF mc

    StuFF mc June 10th, 2010 @ 01:50 PM

    • 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 :(

  • StuFF mc

    StuFF mc June 10th, 2010 @ 04:54 PM

    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.

  • DHH

    DHH June 10th, 2010 @ 04:57 PM

    • State changed from “new” to “open”
    • Assigned user changed from “Yehuda Katz (wycats)” to “Carl Lerche”
  • Prem Sichanugrist (sikachu)

    Prem Sichanugrist (sikachu) June 11th, 2010 @ 02:08 PM

    • 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.)

  • Santiago Pastorino

    Santiago Pastorino June 13th, 2010 @ 02:24 AM

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

  • StuFF mc

    StuFF mc June 18th, 2010 @ 03:22 PM

    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.
  • Prem Sichanugrist (sikachu)

    Prem Sichanugrist (sikachu) June 18th, 2010 @ 03:38 PM

    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?

  • StuFF mc

    StuFF mc June 18th, 2010 @ 03:41 PM

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

    Regular mount?

  • Prem Sichanugrist (sikachu)

    Prem Sichanugrist (sikachu) June 18th, 2010 @ 04:01 PM

    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?

  • StuFF mc

    StuFF mc June 18th, 2010 @ 09:50 PM

    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

  • StuFF mc

    StuFF mc September 6th, 2010 @ 05:49 PM

    • Importance changed from “” to “Low”

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

  • Prem Sichanugrist (sikachu)

    Prem Sichanugrist (sikachu) September 10th, 2010 @ 01:41 PM

    • 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

  • Ryan Bigg

    Ryan Bigg October 9th, 2010 @ 10:14 PM

    • Tag cleared.

    Automatic cleanup of spam.

  • David Trasbo

    David Trasbo October 10th, 2010 @ 02:55 PM

    • State changed from “needs-more-info” to “invalid”

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

  • StuFF mc

    StuFF mc October 14th, 2010 @ 06:16 PM

    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!

  • Jeff Kreeftmeijer
  • bingbing
  • bingbing

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Attachments

Pages