Gems in ~/.gem vs in the Library

W

Wojtek Galaj

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
 
P

Phillip Gawlowski

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.
 
W

Wojtek Galaj

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 :)
 
P

Phillip Gawlowski

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.
 
L

Luis Lavena

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
 
T

Tommaso Visconti

Il 14/11/2010 22:30, Wojtek Galaj ha scritto:
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
 
J

Jose Hales-Garcia

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
 
W

Wojtek Galaj

You are quite welcome. :)


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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top