Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails 3 user to Rails 2: Installing gems without a gemfile?

I'm familiar with Rails 3, but not rails 2. I've just inherited a rails 2 project with no Gemfile, but a bunch of config.gem lines in config/environment.rb

I'm just wondering how I to install these. bundle install returns Could not locate Gemfile.

like image 954
PlankTon Avatar asked Apr 18 '11 01:04

PlankTon


People also ask

What is the difference between Gemfile and Gemfile lock?

The Gemfile is where you specify which gems you want to use, and lets you specify which versions. The Gemfile. lock file is where Bundler records the exact versions that were installed. This way, when the same library/project is loaded on another machine, running bundle install will look at the Gemfile.

Is Gemfile lock automatically generated?

A Gemfile. lock is auto-generated & it says exactly what versions of every gem were installed. Bundler will install these versions so when you deploy this application to production, or share your project with other developers, everyone will be working with an identical set of gems.

How do I install bundles to install missing gems?

Select Tools | Bundler | Install from the main menu. Open the Gemfile, place the caret at any highlighted gem missing in the project SDK and press Alt+Enter . Select Install missing gems using 'bundler' and press Enter .

How do you install gems you added to your Gemfile?

run the command bundle install in your shell, once you have your Gemfile created. This command will look your Gemfile and install the relevant Gems on the indicated versions. The Gemfiles are installed because in your Gemfile you are pointing out the source where the gems can be downloaded from.


1 Answers

You can install gems in rails 2.x by using the rake command

   rake gems:install
like image 176
Jason Yost Avatar answered Nov 09 '22 06:11

Jason Yost