reactive_record
reactive_record copied to clipboard
Generate ActiveRecord models for a pre-existing Postgres db
I have this error after running: rails generate reactive_record:install ``` /home/user/.gem/ruby/2.0.0/gems/reactive_record-0.0.2/lib/code_generator.rb:82:in `initialize': Unknown type: # (RuntimeError) from /home/user/.gem/ruby/2.0.0/gems/reactive_record-0.0.2/lib/parser.rb:251:in `new' from /home/user/.gem/ruby/2.0.0/gems/reactive_record-0.0.2/lib/parser.rb:251:in `_reduce_8' from /home/user/.rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/racc/parser.rb:258:in `_racc_do_parse_c' from /home/user/.rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/racc/parser.rb:258:in `do_parse' from /home/user/.gem/ruby/2.0.0/gems/reactive_record-0.0.2/lib/parser.rb:25:in...
``` shell code/reactive_record(master)✓ rake racc -l -o lib/parser.rb lib/parser.y 9 shift/reduce conflicts /Users/chris/.rvm/rubies/ruby-1.9.3-p448/bin/ruby -S rspec ./spec/lexer_spec.rb ./spec/parser_spec.rb ./spec/reactive_record_spec.rb ........................ Finished in 0.45743 seconds 24 examples, 0 failures ```
Turn them into associations • belongs_to • has_one • has_many • has_and_belongs_to_many Distinguishing foreign keys that were intended as has_one vs has_many might be tricky.