Gems was working but not anymore

Discussion in 'Ruby' started by sarosh.lists@gmail.com, Mar 23, 2007.

  1. Guest

    I installed Ruby, Gems, Rails etc. following the instructions on
    http://hivelogic.com/narrative/articles/ruby-rails-mongrel-mysql-osx
    (Me: using Intel, 10.4, all other settings and versions same as that
    website)

    Gems was working as I was able to install Rails, Mongrel, Capistrano
    and MySql bindings, and I was able to make a test app, and start it
    using script/server
    This was sometime last week

    Now, I wanted to do some tutorials today, but I wasn't able to invoke
    script/server I got error:

    /usr/local/bin/gem:9:in `require': No such file to load -- rubygems
    (LoadError)
    from /usr/local/bin/gem:9

    I found out that I got the same error with anything that requires
    gems. i.e. gem install rails. I even reinstalled Gems but that didn't
    help.

    Any ideas on how I could get this working again? Thanks
    , Mar 23, 2007
    #1
    1. Advertising

  2. Guest

    Figured it out. When I did:
    # ruby -v
    it gave me 1.8.2, meaning that it had reverted to the version included
    with OSX for some reason.

    I did this:
    # . ~/.bash_login
    and it's working again!
    , Mar 23, 2007
    #2
    1. Advertising

  3. John Joyce Guest

    What have you installed since the last time gems worked?

    In Terminal, type:
    which gem
    This should tell you the path to gem

    Perhaps you have tried to do something which has a dependency that is
    missing.
    Many gems depend on other gems.
    it's good to use the --include dependencies option when you install
    a gem.
    Also look into freezing your gems, but that's a different matter.

    Did you start/stop the server? (make sure it's not already running!)
    Is Apache interfering? You may have to stop Apache to run another
    server.

    check the GEM_PATH also...
    in .gemrc

    make sure you're in the directory of your Rails app when you invoke
    script/server
    notice that is the local path from the rails app's directory.
    To start that server from elsewhere:
    ( If you're in another directory )
    replace:
    script/server

    with:
    ~/rails_app_name_here/script/server

    (this assumes you have the app in the top level of your user account,
    in other words in your home directory which has your User Name)

    Configuring paths can be a pain.
    ...and hard to remember and keep track of.
    Rails relies on a little bit of Unix command line ability. The Unix
    in A Nutshell book is highly recommended as a reference to have around!

    On Mar 23, 2007, at 9:20 PM, wrote:

    > I installed Ruby, Gems, Rails etc. following the instructions on
    > http://hivelogic.com/narrative/articles/ruby-rails-mongrel-mysql-osx
    > (Me: using Intel, 10.4, all other settings and versions same as that
    > website)
    >
    > Gems was working as I was able to install Rails, Mongrel, Capistrano
    > and MySql bindings, and I was able to make a test app, and start it
    > using script/server
    > This was sometime last week
    >
    > Now, I wanted to do some tutorials today, but I wasn't able to invoke
    > script/server I got error:
    >
    > /usr/local/bin/gem:9:in `require': No such file to load -- rubygems
    > (LoadError)
    > from /usr/local/bin/gem:9
    >
    > I found out that I got the same error with anything that requires
    > gems. i.e. gem install rails. I even reinstalled Gems but that didn't
    > help.
    >
    > Any ideas on how I could get this working again? Thanks
    >
    >
    John Joyce, Mar 23, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tersia Ehlert

    HTTPS - Window. code not working anymore

    Tersia Ehlert, Jan 10, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    446
    =?Utf-8?B?QnJhZCBSb2JlcnRz?=
    Jan 10, 2005
  2. Dhruba Bandopadhyay

    ASP VIRTUAL keyword not working in ASP.NET anymore :S

    Dhruba Bandopadhyay, Mar 22, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    4,882
    Dhruba Bandopadhyay
    Mar 22, 2006
  3. Eric Lilja
    Replies:
    4
    Views:
    465
  4. arthernan
    Replies:
    1
    Views:
    291
    Mike Placentra II
    Oct 22, 2007
  5. Lloyd Zusman
    Replies:
    3
    Views:
    166
    Lloyd Zusman
    Jun 21, 2005
Loading...

Share This Page