Gems in ~/.gem vs in the Library

Discussion in 'Ruby' started by Wojtek Galaj, Nov 14, 2010.

  1. Wojtek Galaj

    Wojtek Galaj Guest

    Hello all,

    I am completely new to Ruby on Rails. When i install gems some of them
    get installed to ~/.gem folder as apparently the other location is not
    writable.

    What is the best way to go about this: chmod the folder in Library,
    let gems go to ~/.gem, sudo install gems always? What do you guys use?

    Thanks in advance,
    Wojtek
     
    Wojtek Galaj, Nov 14, 2010
    #1
    1. Advertising

  2. On Sun, Nov 14, 2010 at 10:15 PM, Wojtek Galaj <> wrote:
    > Hello all,
    >
    > I am completely new to Ruby on Rails. When i install gems some of them
    > get installed to ~/.gem folder as apparently the other location is not
    > writable.
    >
    > What is the best way to go about this: chmod the folder in Library,
    > let gems go to ~/.gem, sudo install gems always? What do you guys use?


    1) Don't chmod system folders unless you know what you are doing
    (doubly so on a, I guess, Mac. Steve might get upset about you
    thinking you know better than him).

    2) Where to install gems depends on whether you want them available to
    every user, or just yourself, and there's no real answer to that.
    require (in 1.9) RubyGems (pre-1.9) are smart enough to find gems in
    either case, if you deploy your stuff elsewhere (or use bundler to
    make sure you distribute the correct gems and gem versions).

    --
    Phillip Gawlowski

    Though the folk I have met,
    (Ah, how soon!) they forget
    When I've moved on to some other place,
    There may be one or two,
    When I've played and passed through,
    Who'll remember my song or my face.
     
    Phillip Gawlowski, Nov 14, 2010
    #2
    1. Advertising

  3. Wojtek Galaj

    Wojtek Galaj Guest

    On Nov 14, 10:24 pm, Phillip Gawlowski <>
    wrote:
    > On Sun, Nov 14, 2010 at 10:15 PM, Wojtek Galaj <> wrote:
    > > Hello all,

    >
    > > I am completely new to Ruby on Rails. When i install gems some of them
    > > get installed to ~/.gem folder as apparently the other location is not
    > > writable.

    >
    > > What is the best way to go about this: chmod the folder in Library,
    > > let gems go to ~/.gem, sudo install gems always? What do you guys use?

    >
    > 1) Don't chmod system folders unless you know what you are doing
    > (doubly so on a, I guess, Mac. Steve might get upset about you
    > thinking you know better than him).
    >
    > 2) Where to install gems depends on whether you want them available to
    > every user, or just yourself, and there's no real answer to that.
    > require (in 1.9) RubyGems (pre-1.9) are smart enough to find gems in
    > either case, if you deploy your stuff elsewhere (or use bundler to
    > make sure you distribute the correct gems and gem versions).
    >
    > --
    > Phillip Gawlowski
    >
    > Though the folk I have met,
    > (Ah, how soon!) they forget
    > When I've moved on to some other place,
    > There may be one or two,
    > When I've played and passed through,
    > Who'll remember my song or my face.


    Thank you kind sir.

    I have another question. It's a bit silly really. I am trying to make
    a new app but typing "rails new appName" creates a folder named "new"
    instead of "appName".

    Baby steps over here :)
     
    Wojtek Galaj, Nov 14, 2010
    #3
  4. On Sun, Nov 14, 2010 at 10:30 PM, Wojtek Galaj <> wrote:
    > Thank you kind sir.


    You are quite welcome. :)

    > I have another question. It's a bit silly really. I am trying to make
    > a new app but typing "rails new appName" creates a folder named "new"
    > instead of "appName".


    Well, you have all the information you need to solve your problem. ;)

    (hint: You don't need "new" for a new Rails app.)

    And two tips for the future:

    The Rails forum is the best place to ask Rails related questions.

    This here list is the best place to ask Ruby questions. :)

    --
    Phillip Gawlowski

    Though the folk I have met,
    (Ah, how soon!) they forget
    When I've moved on to some other place,
    There may be one or two,
    When I've played and passed through,
    Who'll remember my song or my face.
     
    Phillip Gawlowski, Nov 14, 2010
    #4
  5. Wojtek Galaj

    Luis Lavena Guest

    On Nov 14, 6:30 pm, Wojtek Galaj <> wrote:
    >
    > I have another question. It's a bit silly really. I am trying to make
    > a new app but typing "rails new appName" creates a folder named "new"
    > instead of "appName".
    >


    gem update rails

    rails 'new' was introduced in Rails 3.0, check your version of rails
    (rails --version) and will know.

    If the gems you installed where installed in ~/.gem, you need to add
    the ~/.gem bin folder to your $PATH

    --
    Luis Lavena
     
    Luis Lavena, Nov 14, 2010
    #5
  6. Il 14/11/2010 22:30, Wojtek Galaj ha scritto:
    >>> I am completely new to Ruby on Rails. When i install gems some of them
    >>> get installed to ~/.gem folder as apparently the other location is not
    >>> writable.


    i suggest forget the system gem command and use RVM
    (http://rvm.beginrescueend.com/) so you have a clean system and
    everything you need to develop your software is inside the ~/.rvm folder
    (ruby versions and gems).

    > I have another question. It's a bit silly really. I am trying to make
    > a new app but typing "rails new appName" creates a folder named "new"
    > instead of "appName".


    maybe you're using Rails 2.X and not Rails 3. Run `gem list` and show
    the result
     
    Tommaso Visconti, Nov 14, 2010
    #6
  7. On Nov 14, 2010, at 1:30 PM, Wojtek Galaj <> wrote:

    > I have another question. It's a bit silly really. I am trying to make
    > a new app but typing "rails new appName" creates a folder named "new"
    > instead of "appName".


    The 'new' arg was introduced in mid-stream of the Rails 3 beta releases.

    Do rails -h to see what syntax your version uses. You may need to update.

    Jose
    ==============
    Jose Hales-Garcia
    UCLA Statistics
     
    Jose Hales-Garcia, Nov 14, 2010
    #7
  8. Wojtek Galaj

    Wojtek Galaj Guest

    On Nov 14, 10:46 pm, Phillip Gawlowski <>
    wrote:
    > On Sun, Nov 14, 2010 at 10:30 PM, Wojtek Galaj <> wrote:
    > > Thank you kind sir.

    >
    > You are quite welcome. :)
    >
    > > I have another question. It's a bit silly really. I am trying to make
    > > a new app but typing "rails new appName" creates a folder named "new"
    > > instead of "appName".

    >
    > Well, you have all the information you need to solve your problem. ;)
    >
    > (hint: You don't need "new" for a new Rails app.)
    >
    > And two tips for the future:
    >
    > The Rails forum is the best place to ask Rails related questions.
    >
    > This here list is the best place to ask Ruby questions. :)
    >
    > --
    > Phillip Gawlowski
    >
    > Though the folk I have met,
    > (Ah, how soon!) they forget
    > When I've moved on to some other place,
    > There may be one or two,
    > When I've played and passed through,
    > Who'll remember my song or my face.


    Thank you again.

    Noted, this is indeed a Ruby group not a Rails one :) Sorry about
    that.

    Cheers,
    Wojtek
     
    Wojtek Galaj, Nov 14, 2010
    #8
    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. Tomás

    Gems -- #include <gems.hpp>

    Tomás, Mar 4, 2006, in forum: C++
    Replies:
    7
    Views:
    449
    Tomás
    Mar 5, 2006
  2. Lloyd Zusman
    Replies:
    3
    Views:
    207
    Lloyd Zusman
    Jun 21, 2005
  3. Dany Cayouette

    'private' gems/gems hierarchy

    Dany Cayouette, Nov 25, 2005, in forum: Ruby
    Replies:
    3
    Views:
    174
    Jim Weirich
    Nov 25, 2005
  4. Thaddeus L Olczyk

    Problem getting gems/listing gems. EINVAL

    Thaddeus L Olczyk, Aug 15, 2006, in forum: Ruby
    Replies:
    0
    Views:
    204
    Thaddeus L Olczyk
    Aug 15, 2006
  5. Austin 7873
    Replies:
    5
    Views:
    220
    Eric Hodel
    Jan 27, 2007
Loading...

Share This Page