mlomnicki / redhillonrails_core Goto Github PK
View Code? Open in Web Editor NEWAdds support in ActiveRecord for foreign_keys, complex indexes and other database-related stuff
License: MIT License
Adds support in ActiveRecord for foreign_keys, complex indexes and other database-related stuff
License: MIT License
After upgrading to version 1.2.0 of redhillonrails_core I get this weird error when trying to push to Heroku:
[...]
Installing rack-openid (1.3.1)
Installing ruby-openid-apps-discovery (1.2.0)
Installing oa-openid (0.2.6)
Installing omniauth (0.2.6)
Installing pg (0.11.0) with native extensions
Using bundler (1.0.7)
Installing rails (3.0.9)
/usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/specification.rb:519:in `normalize_yaml_input': invalid byte sequence in US-ASCII (ArgumentError)
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/specification.rb:479:in `from_yaml'
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/package/tar_input.rb:183:in `load_gemspec'
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/package/tar_input.rb:51:in `block in initialize'
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/package/tar_reader.rb:64:in `block in each'
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/package/tar_reader.rb:55:in `loop'
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/package/tar_reader.rb:55:in `each'
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/package/tar_input.rb:32:in `initialize'
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/package/tar_input.rb:17:in `new'
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/package/tar_input.rb:17:in `open'
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/package.rb:58:in `open'
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/format.rb:63:in `from_io'
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/format.rb:51:in `block in from_file_by_path'
from /usr/ruby1.9.2/lib/ruby/1.9.1/open-uri.rb:35:in `open'
from /usr/ruby1.9.2/lib/ruby/1.9.1/open-uri.rb:35:in `open'
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/format.rb:50:in `from_file_by_path'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/source.rb:72:in `fetch'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/installer.rb:45:in `block in run'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `block in each'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `each'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `each'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/installer.rb:44:in `run'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/installer.rb:8:in `install'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/cli.rb:225:in `install'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/vendor/thor/task.rb:22:in `run'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/vendor/thor.rb:246:in `dispatch'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/vendor/thor/base.rb:389:in `start'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/bin/bundle:13:in `<top (required)>'
from /usr/ruby1.9.2/bin/bundle:19:in `load'
from /usr/ruby1.9.2/bin/bundle:19:in `<main>'
FAILED: http://devcenter.heroku.com/articles/bundler
! Heroku push rejected, failed to install gems via Bundler
If I switch back to 1.1.3 I can push just fine again. Unfortunately, I cannot reproduce this error on my own machine.
I tried updating a handful of other gems - this worked just fine.
So my guess is that there is something weird with the 1.2.0-gem, but cannot find out exactly what...
I found this slightly related post: http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/e7d75e66d400619c/a9fc8228c4920b14?lnk=raot&pli=1
The redhillonrails_core methods for mysql use index based columns when listing foreign keys, and these are not supported by activerecord-jdbc-adapter.
I have a fix that simply uses the names of the columns instead of the column indexes in the result set.
When I do:
change_column :segments, :parent_id, :integer, :references => :segments, :null => false
The foreign key constraint isn't added.
MySQL does not accept "...DROP CONSTRAINT..." statement for dropping foreign keys. Please use "...DROP FOREIGN KEY...".
Upgrading to newest mysql2 (0.2.7) breaks my application. If I remove redhillonrails_core it works again.
This is the error I see when trying to use mysql2 0.2.7 and redhillonrails_core. Using redhillonrails_core 1.1.3.
ruby-1.9.2-p136 :001 > a = Airline.new
NoMethodError: undefined method `case_sensitive?' for #<ActiveRecord::ConnectionAdapters::Mysql2IndexDefinition:0x00000100ef30c0>
from /Users/rasmus/.rvm/gems/ruby-1.9.2-p136/gems/redhillonrails_core-1.1.3/lib/redhillonrails_core/active_record/base.rb:33:in `block in columns_with_redhillonrails_core'
from /Users/rasmus/.rvm/gems/ruby-1.9.2-p136/gems/redhillonrails_core-1.1.3/lib/redhillonrails_core/active_record/base.rb:29:in `each'
from /Users/rasmus/.rvm/gems/ruby-1.9.2-p136/gems/redhillonrails_core-1.1.3/lib/redhillonrails_core/active_record/base.rb:29:in `columns_with_redhillonrails_core'
from /Users/rasmus/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.0.5/lib/active_record/persistence.rb:284:in `attributes_from_column_definition'
from /Users/rasmus/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.0.5/lib/active_record/locking/optimistic.rb:62:in `attributes_from_column_definition'
from /Users/rasmus/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.0.5/lib/active_record/base.rb:1394:in `initialize'
from (irb):1:in `new'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.