megas
megas

Reputation: 21791

gem install trouble

I have a weird trouble, i've updated the .irbrc file to make better looking, for this I installed awesome_print, wirble and looksee gems, check them by gem list - every gem is there. And when i run rails console i got this:

Cannot find awesome_print gem. Please run 'gem install awesome_print' to install it.
Cannot find wirble. Please run 'gem install wirble' to install it.
Cannot find looksee. Please run 'gem install looksee' to install it.

I've no idea why it happen. I have rvm on my system but I don't think it causes the problem. Thanks.

Upvotes: 0

Views: 400

Answers (1)

Andy Lindeman
Andy Lindeman

Reputation: 12165

To install gems in Rails 3, add them to your Gemfile

For instance:

gem 'awesome_print'
gem 'wirble'
gem 'looksee'

Then run bundle install.

It's also a best practice to create a gemset with rvm per-project to isolate dependencies among projects.

To do this, in your Rails root directory run: rvm --create --rvmrc 1.9.2@myproject (substitute 1.9.2 with whatever version of Ruby you want to use).

After creating the gemset, rerun bundle install.

You'll notice an .rvmrc file has been created, which makes sure whenever you cd to that directory, the "myproject" gemset will automatically be used. Add this to version control so other developers get the same effect.

Upvotes: 2

Related Questions