开发者

In Rails, why sqlite works without config.gem 'sqlite3-ruby'

开发者 https://www.devze.com 2023-01-21 23:00 出处:网络
With a new Rails 2.3.10 project, the file config/environment.rb has the following line commented o开发者_如何学Pythonut:

With a new Rails 2.3.10 project, the file config/environment.rb has the following line commented o开发者_如何学Pythonut:

# config.gem "sqlite3-ruby", :lib => "sqlite3"

but for some reason, I tried a scaffold foo, and start the rails server, and the app is running.

I thought the requirement is, every gem the app needs, it has to be listed in config/environment.rb?


In Rails 2.3, it's enough to have the gem installed on your system for you to use it.

In Rails 3, you must have the gem listed in your Gemfile and installed via bundler to use the gem.

0

精彩评论

暂无评论...
验证码 换一张
取 消