Reputation: 11
Recently I started my adventure with Ruby on Rails using version 2.3.14. When generating a new project, why isn't Rails creating a Gemfile
?
Upvotes: 1
Views: 3001
Reputation: 28703
Rails 2.3 doesn't have built-in bundler support because it came out before Bundler.
The Bundler website provides instructions for adding Bundler to Rails 2.3.
In short:
config/preinitializer.rb
to set up the bundled environment before Rails is loadedconfig/boot.rb
to require the bundled gemsconfig.gem
declarations to the Gemfile
Upvotes: 2
Reputation: 84343
Why? Because it just doesn't. Rails 3 has native Bundler support, but you can add Bundler support to Rails 2.3 by following the step-by-step directions on the Bundler web site.
If you just want a Gemfile, rather than Bundler integration with Rails, you can create one easily enough.
gem install bundler
bundle init
In older versions of Rails, the way to handle gems was to vendor your gems. The old 2.3 version of A Guide to The Rails Command Line may help you, especially the section that covers rake gems:install
.
Upvotes: 2