Silence gem specification warnings
If you happen to get those:
[565] $ rake
(in /Users/piotr/Projects/Lookup)
config.gem: Unpacked gem cache in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.
config.gem: Unpacked gem cache in vendor/gems not in a versioned directory. Giving up.
config.gem: Unpacked gem doc in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.
config.gem: Unpacked gem doc in vendor/gems not in a versioned directory. Giving up.
config.gem: Unpacked gem environment.rb in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.
config.gem: Unpacked gem environment.rb in vendor/gems not in a versioned directory. Giving up.
config.gem: Unpacked gem gems in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.
config.gem: Unpacked gem gems in vendor/gems not in a versioned directory. Giving up.
config.gem: Unpacked gem specifications in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.
config.gem: Unpacked gem specifications in vendor/gems not in a versioned directory. Giving up.
You can silent them in environment.rb’s config block with:
Rails::VendorGemSourceIndex.silence_spec_warnings = true
New rails_sequel Plugin
Recently, I was porting an Merb and Rails application from DataMapper to Sequel. It is pretty much straightforward with Merb, as you only have to specify use_orm :sequel in your init.rb file to get Sequel configured automatically.
With Rails you have to do this manually eg.:
DB = Sequel.connect('mysql://localhost/database')
or… use my new plugin rails_sequel.
rails_sequel is a simple plugin which loads Sequel, reads database.yml file and adds missing methods such as to_param or new_record?.
You can install it like any other Rails plugin:
script/plugin install git://github.com/pusewicz/rails_sequel.git
Alternatively you can install a gem:
gem install gemcutter
gem tumble
gem install rails_sequel
Load the gem in environment.rb
Rails::Initializer.run do |config|
config.gem 'rails_sequel', :lib => 'rails_sequel', :source => 'http://gems.github.com'
end
You might want to remove ActiveRecord framework in environment.rb file as well:
config.frameworks -= [ :active_record ]