Starting rails server problem

Still fairly new to Ruby and Rails in general and trying to figure out how to address this error. I recently migrated to a new computer and now I get this error message when I try to start the rails server.

-bash: /Users/user1/.rvm/gems/ruby-1.9.3-p125/bin/rails: /Users/user/.rvm/rubies/ruby-1.9.3-p125/bin/ruby: bad interpreter: No such file or directory

I know what the problem is and it's being caused because my ID from one mac to the other changed from user to user1, now rails is still trying to start the server using my old path. I just don't know where I would go to change that path and tell rails to look under user1 and not user.

Still fairly new to Ruby and Rails in general and trying to figure out how to address this error. I recently migrated to a new computer and now I get this error message when I try to start the rails server.

-bash: /Users/user1/.rvm/gems/ruby-1.9.3-p125/bin/rails: /Users/user/.rvm/rubies/ruby-1.9.3-p125/bin/ruby: bad interpreter: No such file or directory

I know what the problem is and it's being caused because my ID from one mac to the other changed from user to user1, now rails is still trying to start the server using my old path. I just don't know where I would go to change that path and tell rails to look under user1 and not user.

Did you install rvm and ruby as the new user, or did you just copy files across?

Colin

I installed rvm, ruby, rubygems and rails from scratch. However I had some apps and tutorials I was working on that I copied over from the old computer.

Please don't top post, it makes it difficult to follow the thread. Insert your reply at appropriate point(s) in previous message. Thanks

I installed rvm, ruby, rubygems and rails from scratch. However I had some apps and tutorials I was working on that I copied over from the old computer.

What do get (in the app that is failing) for rvm info ruby -v rails -v

If those look ok does it work if you make a new rails project?

Colin

RVM OUTPUT -----

ruby-1.9.3-p125:

  system:     uname: "Darwin Derks-MacBook-Air.local 12.2.1 Darwin Kernel Version 12.2.1: Thu Oct 18 16:32:48 PDT 2012; root:xnu-2050.20.9~2/RELEASE_X86_64 x86_64"     bash: "/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin12)"     zsh: "/bin/zsh => zsh 4.3.11 (i386-apple-darwin12.0)"

  rvm:     version: "rvm 1.10.3 by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.beginrescueend.com/\]"     updated: "8 months 25 days 17 hours 40 minutes 12 seconds ago"

  ruby:     interpreter: "ruby"     version: "1.9.3p125"     date: "2012-02-16"     platform: "x86_64-darwin12.2.1"     patchlevel: "2012-02-16 revision 34643"     full_version: "ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin12.2.1]"

  homes:     gem: "/Users/derkdoijer1/.rvm/gems/ruby-1.9.3-p125"     ruby: "/Users/derkdoijer1/.rvm/rubies/ruby-1.9.3-p125"

  binaries:     ruby: "/Users/derkdoijer1/.rvm/rubies/ruby-1.9.3-p125/bin/ruby"     irb: "/Users/derkdoijer1/.rvm/rubies/ruby-1.9.3-p125/bin/irb"     gem: "/Users/derkdoijer1/.rvm/rubies/ruby-1.9.3-p125/bin/gem"     rake: "/Users/derkdoijer1/.rvm/gems/ruby-1.9.3-p125/bin/rake"

  environment:     PATH: "/Users/derkdoijer1/.rvm/gems/ruby-1.9.3-p125/bin:/Users/derkdoijer1/.rvm/gems/ruby-1.9.3-p125@global/bin:/Users/derkdoijer1/.rvm/rubies/ruby-1.9.3-p125/bin:/Users/derkdoijer1/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/Users/derkdoijer1/bin/subl"     GEM_HOME: "/Users/derkdoijer1/.rvm/gems/ruby-1.9.3-p125"     GEM_PATH: "/Users/derkdoijer1/.rvm/gems/ruby-1.9.3-p125:/Users/derkdoijer1/.rvm/gems/ruby-1.9.3-p125@global"     MY_RUBY_HOME: "/Users/derkdoijer1/.rvm/rubies/ruby-1.9.3-p125"     IRBRC: "/Users/derkdoijer1/.rvm/rubies/ruby-1.9.3-p125/.irbrc"     RUBYOPT: ""     gemset: ""

RVM OUTPUT -----

ruby-1.9.3-p125:

  system:     uname: "Darwin Derks-MacBook-Air.local 12.2.1 Darwin Kernel Version 12.2.1: Thu Oct 18 16:32:48 PDT 2012; root:xnu-2050.20.9~2/RELEASE_X86_64 x86_64"     bash: "/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin12)"     zsh: "/bin/zsh => zsh 4.3.11 (i386-apple-darwin12.0)"

  rvm:     version: "rvm 1.10.3 by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.beginrescueend.com/\]"     updated: "8 months 25 days 17 hours 40 minutes 12 seconds ago"

  ruby:     interpreter: "ruby"     version: "1.9.3p125"     date: "2012-02-16"     platform: "x86_64-darwin12.2.1"     patchlevel: "2012-02-16 revision 34643"     full_version: "ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin12.2.1]"

  homes:     gem: "/Users/derkdoijer1/.rvm/gems/ruby-1.9.3-p125"

Is that path to the current logged in user?

    ruby: "/Users/derkdoijer1/.rvm/rubies/ruby-1.9.3-p125"

  binaries:     ruby: "/Users/derkdoijer1/.rvm/rubies/ruby-1.9.3-p125/bin/ruby"     irb: "/Users/derkdoijer1/.rvm/rubies/ruby-1.9.3-p125/bin/irb"     gem: "/Users/derkdoijer1/.rvm/rubies/ruby-1.9.3-p125/bin/gem"     rake: "/Users/derkdoijer1/.rvm/gems/ruby-1.9.3-p125/bin/rake"

  environment:     PATH: "/Users/derkdoijer1/.rvm/gems/ruby-1.9.3-p125/bin:/Users/derkdoijer1/.rvm/gems/ruby-1.9.3-p125@global/bin:/Users/derkdoijer1/.rvm/rubies/ruby-1.9.3-p125/bin:/Users/derkdoijer1/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/Users/derkdoijer1/bin/subl"     GEM_HOME: "/Users/derkdoijer1/.rvm/gems/ruby-1.9.3-p125"     GEM_PATH: "/Users/derkdoijer1/.rvm/gems/ruby-1.9.3-p125:/Users/derkdoijer1/.rvm/gems/ruby-1.9.3-p125@global"     MY_RUBY_HOME: "/Users/derkdoijer1/.rvm/rubies/ruby-1.9.3-p125"     IRBRC: "/Users/derkdoijer1/.rvm/rubies/ruby-1.9.3-p125/.irbrc"     RUBYOPT: ""     gemset: ""

----------

$ ruby -v

ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin12.2.1]

----------

$ rails -v

Rails 3.2.9

----------

Creating a new rails app works as expected however when I try to start the rails server I get the following error:

/Users/derkdoijer1/.rvm/gems/ruby-1.9.3-p125/gems/sqlite3-1.3.6/lib/sqlite3.rb:6:in `require': dlopen(/Users/derkdoijer1/.rvm/gems/ruby-1.9.3-p125/gems/sqlite3-1.3.6/lib/sqlite3/sqlite3_native.bundle, 9): Library not loaded: /Users/derkdoijer/.rvm/rubies/ruby-1.9.3-p125/lib/libruby.1.9.1.dylib (LoadError)   Referenced from: /Users/derkdoijer1/.rvm/gems/ruby-1.9.3-p125/gems/sqlite3-1.3.6/lib/sqlite3/sqlite3_native.bundle   Reason: image not found - /Users/derkdoijer1/.rvm/gems/ruby-1.9.3-p125/gems/sqlite3-1.3.6/lib/sqlite3/sqlite3_native.bundle   from /Users/derkdoijer1/.rvm/gems/ruby-1.9.3-p125/gems/sqlite3-1.3.6/lib/sqlite3.rb:6:in `rescue in <top (required)>'   from /Users/derkdoijer1/.rvm/gems/ruby-1.9.3-p125/gems/sqlite3-1.3.6/lib/sqlite3.rb:2:in `<top (required)>'   from /Users/derkdoijer1/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.2.2/lib/bundler/runtime.rb:68:in `require'   from /Users/derkdoijer1/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.2.2/lib/bundler/runtime.rb:68:in `block (2 levels) in require'   from /Users/derkdoijer1/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.2.2/lib/bundler/runtime.rb:66:in `each'   from /Users/derkdoijer1/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.2.2/lib/bundler/runtime.rb:66:in `block in require'   from /Users/derkdoijer1/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.2.2/lib/bundler/runtime.rb:55:in `each'   from /Users/derkdoijer1/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.2.2/lib/bundler/runtime.rb:55:in `require'   from /Users/derkdoijer1/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.2.2/lib/bundler.rb:128:in `require'   from /Users/derkdoijer1/rails_projects/second_app/config/application.rb:7:in `<top (required)>'   from /Users/derkdoijer1/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.9/lib/rails/commands.rb:53:in `require'   from /Users/derkdoijer1/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.9/lib/rails/commands.rb:53:in `block in <top (required)>'   from /Users/derkdoijer1/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.9/lib/rails/commands.rb:50:in `tap'   from /Users/derkdoijer1/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.9/lib/rails/commands.rb:50:in `<top (required)>'   from script/rails:6:in `require'   from script/rails:6:in `<main>'

The main issue I see is where it says Library not loaded: the path isn't correct and seems to be trying to reference my old ID and not the new one. Where I would go to fix this I have no idea.

Not sure exactly which path you are referring to. Previously you mentioned user and user1, are those not the actual names?

Would perhaps completely removing rails, ruby and rvm be a solution here?

You said you have only just installed them.

Colin

1. Yes

2. Correct, if you look on the error where it says Library not loaded: /Users/derkdoijer/.rvm/rubies/ruby-1.9.3-p125/lib/libruby.1.9.1.dylib

It's still referring to my old username (I was using user and user1 as an example here) the usernames are derkdoijer and derkdoijer1

3. I had them installed on my previous system and reinstalled them on my new system since this did not migrate over correctly. I'm wondering if wiping the slate clean will potentially fix the problem.

1. Yes

Since you have not followed my request to insert your reply inline in previous post and even worse have not even quoted the previous message no-one finding this in the future will have any idea about what this message is about. Remember this is a mailing list not a forum (though you may be accessing it via a forum-like interface).

2. Correct, if you look on the error where it says Library not loaded: /Users/derkdoijer/.rvm/rubies/ruby-1.9.3-p125/lib/libruby.1.9.1.dylib

It's still referring to my old username (I was using user and user1 as an example here) the usernames are derkdoijer and derkdoijer1

Yes I see that now, have you got a user dekdoijer on the new system? If not then are you sure you did not copy the .rvm stuff from your old user directory across to the new one?

3. I had them installed on my previous system and reinstalled them on my new system since this did not migrate over correctly. I'm wondering if wiping the slate clean will potentially fix the problem.

If I am right and you copied the .rvm stuff from the old user to the new one then just running through the rvm and ruby install might not have fully re-installed them, so paths to the old user are still there. I think you may be right to fully remove all rvm stuff and re-install.

Colin

Colin Law wrote in post #1087765:

1. Yes

Since you have not followed my request to insert your reply inline in previous post and even worse have not even quoted the previous message no-one finding this in the future will have any idea about what this message is about. Remember this is a mailing list not a forum (though you may be accessing it via a forum-like interface).

My apologies, I did not notice that in your original reply above and will reply inline from now on. I do in fact access this via a forum like interface and was not aware that this was a mailing list. Again, my apologies.

2. Correct, if you look on the error where it says Library not loaded: /Users/derkdoijer/.rvm/rubies/ruby-1.9.3-p125/lib/libruby.1.9.1.dylib

It's still referring to my old username (I was using user and user1 as an example here) the usernames are derkdoijer and derkdoijer1

Yes I see that now, have you got a user dekdoijer on the new system? If not then are you sure you did not copy the .rvm stuff from your old user directory across to the new one?

user derkdoijer does not exist on the new system. You are most likely correct that .rvm was copied over and not properly reinstalled when I setup my new system. I used the migration assistant to migrate my files over to the new system.

3. I had them installed on my previous system and reinstalled them on my new system since this did not migrate over correctly. I'm wondering if wiping the slate clean will potentially fix the problem.

If I am right and you copied the .rvm stuff from the old user to the new one then just running through the rvm and ruby install might not have fully re-installed them, so paths to the old user are still there. I think you may be right to fully remove all rvm stuff and re-install.

Colin

would 'rvm implode' be the best way to go about doing this or is that overkill?

That sounds like a good plan, then you know you have removed everything.

Colin

Colin Law wrote in post #1087800: