New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rake ar:migrate w/ Postgres - undefined method `name' for nil:NilClass #646

Closed
jmazzi opened this Issue Aug 29, 2011 · 1 comment

Comments

Projects
None yet
3 participants
@jmazzi

jmazzi commented Aug 29, 2011

Version: Padrino v. 0.10.1

Command used to generate the project:

padrino g project blah -n Blah -b -a postgres -d activerecord -t rspec -e haml -s jquery -c sass

When I generate a model with:

padrino g model company test:string

And run a migrate, I get the following error:

blah ➤ padrino rake ar:migrate --trace                                                                         
=> Executing Rake ar:migrate --trace ...
** Invoke ar:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute ar:migrate
** Invoke ar:schema:dump (first_time)
** Invoke environment 
** Execute ar:schema:dump
rake aborted!
undefined method `name' for nil:NilClass
/Users/justin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/activerecord-3.0.10/lib/active_record/schema_dumper.rb:44:in `header'
/Users/justin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/activerecord-3.0.10/lib/active_record/schema_dumper.rb:26:in `dump'
/Users/justin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/activerecord-3.0.10/lib/active_record/schema_dumper.rb:21:in `dump'
/Users/justin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/padrino-gen-0.10.1/lib/padrino-gen/padrino-tasks/activerecord.rb:244:in `block (4 levels) in <top (required)>'
/Users/justin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/padrino-gen-0.10.1/lib/padrino-gen/padrino-tasks/activerecord.rb:243:in `open'
/Users/justin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/padrino-gen-0.10.1/lib/padrino-gen/padrino-tasks/activerecord.rb:243:in `block (3 levels) in <top (required)>'
/Users/justin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:205:in `call'
/Users/justin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:205:in `block in execute'
/Users/justin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:200:in `each'
/Users/justin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute'
/Users/justin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/justin/.rbenv/versions/1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/justin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/justin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke'
/Users/justin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/padrino-gen-0.10.1/lib/padrino-gen/padrino-tasks/activerecord.rb:137:in `block (2 levels) in <top (required)>'
/Users/justin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:205:in `call'
/Users/justin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:205:in `block in execute'
/Users/justin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:200:in `each'
/Users/justin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute'
/Users/justin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/justin/.rbenv/versions/1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/justin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/justin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke'
/Users/justin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:112:in `invoke_task'
/Users/justin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:90:in `block (2 levels) in top_level'
/Users/justin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:90:in `each'
/Users/justin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:90:in `block in top_level'
/Users/justin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Users/justin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_level'
/Users/justin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/padrino-core-0.10.1/lib/padrino-core/cli/rake.rb:14:in `init'
/Users/justin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/padrino-core-0.10.1/lib/padrino-core/cli/base.rb:57:in `rake'
/Users/justin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
/Users/justin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
/Users/justin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor.rb:263:in `dispatch'
/Users/justin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
/Users/justin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/padrino-core-0.10.1/bin/padrino:9:in `<top (required)>'
/Users/justin/.rbenv/versions/1.9.2-p290/bin/padrino:19:in `load'
/Users/justin/.rbenv/versions/1.9.2-p290/bin/padrino:19:in `<main>'
Tasks: TOP => ar:schema:dump
blah ➤                                                                                                   

@jmazzi jmazzi closed this Aug 29, 2011

@jmazzi jmazzi reopened this Aug 29, 2011

@skade

This comment has been minimized.

Show comment
Hide comment
@skade

skade Aug 29, 2011

Member

This is an ActiveRecord 3.0.10 bug. See details here:

http://groups.google.com/group/padrino/browse_thread/thread/9398606f6985c57d

I will close this ticket once AR is fixed.

Member

skade commented Aug 29, 2011

This is an ActiveRecord 3.0.10 bug. See details here:

http://groups.google.com/group/padrino/browse_thread/thread/9398606f6985c57d

I will close this ticket once AR is fixed.

@DAddYE DAddYE closed this in c9932e9 Aug 30, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment