Я просто хочу попробовать новый кадр Падрино. Я следовал инструкциям здесь .
Я застрял в выполнении задач грабли.
Я использовал Mysql в качестве базы данных. Я создал проект с помощью команды.
проект padrino g sample_blog -t следует -e haml -c sass -s jquery -d activerecord -a mysql padrino g admin
У меня есть все зависимости по порядку, я сделал Bundle install , чтобы убедиться в этом.
Затем, когда я запускаю грабли, я получаю эту ошибку.
$ padrino rake ar: create --trace
=> Выполнение Rake ar: create --trace ...
** Вызовите ar: create (first_time)
** Вызвать среду (первый раз)
** Выполнить среду
** Выполнить ар: создать
грабли прерваны!
неопределенный метод []' for nil:NilClass<br>
/usr/lib/ruby/gems/1.8/gems/padrino-gen-0.9.14/lib/padrino-gen/padrino-tasks/activerecord.rb:56:in
create_database '
/usr/lib/ruby/gems/1.8/gems/padrino-gen-0.9.14/lib/padrino-gen/padrino-tasks/activerecord.rb:31
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in call'<br>
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in
execute '
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in each'<br>
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in
execute '
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in invoke_with_call_chain'<br>
/usr/lib/ruby/1.8/monitor.rb:242:in
синхронизировать *
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in invoke_with_call_chain'<br>
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in
invoke '
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in invoke_task'<br>
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
top_level '
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in each'<br>
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
top_level '
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in standard_exception_handling'<br>
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in
top_level '
/usr/lib/ruby/gems/1.8/gems/padrino-core-0.9.14/lib/padrino-core/cli/rake.rb:9:in init'<br>
/usr/lib/ruby/gems/1.8/gems/padrino-core-0.9.14/lib/padrino-core/cli/base.rb:50:in
rake '
/usr/lib/ruby/gems/1.8/gems/thor-0.13.4/lib/thor/task.rb:33:in send'<br>
/usr/lib/ruby/gems/1.8/gems/thor-0.13.4/lib/thor/task.rb:33:in
run '
/usr/lib/ruby/gems/1.8/gems/thor-0.13.4/lib/thor/invocation.rb:109:in invoke'<br>
/usr/lib/ruby/gems/1.8/gems/thor-0.13.4/lib/thor/invocation.rb:116:in
call '
/usr/lib/ruby/gems/1.8/gems/thor-0.13.4/lib/thor/invocation.rb:116:in invoke'
/usr/lib/ruby/gems/1.8/gems/thor-0.13.4/lib/thor.rb:137:in
start '
/usr/lib/ruby/gems/1.8/gems/thor-0.13.4/lib/thor/base.rb:378:in start'<br>
/usr/lib/ruby/gems/1.8/gems/thor-0.13.4/lib/thor.rb:124:in
start '
/usr/lib/ruby/gems/1.8/gems/padrino-core-0.9.14/bin/padrino:24
/ usr / bin / padrino: 19: в `load '
/ usr / bin / padrino: 19
$ padrino rake ar: migrate --trace
=> Выполнение Rake ar: migrate --trace ...
** Вызовите ar: migrate (first_time)
** Вызвать среду (первый раз)
** Выполнить среду
** Выполнить ар: мигрировать
грабли прерваны!
ActiveRecord :: ConnectionNotEstablished
/home/deepak/.bundle/ruby/1.8/gems/activerecord- 2.3.8 / lib / active_record / connection_adapters / abstract / connection_pool.rb: 326: в retrieve_connection'<br>
/home/deepak/.bundle/ruby/1.8/gems/activerecord- 2.3.8/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:in
retrieve_connection '
/home/deepak/.bundle/ruby/1.8/gems/activerecord- 2.3.8 / lib / active_record / connection_adapters / abstract / connection_specification.rb: 115: в connection'<br>
/home/deepak/.bundle/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/migration.rb:440:in
инициализировать
/home/deepak/.bundle/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/migration.rb:401:in new'<br>
/home/deepak/.bundle/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/migration.rb:401:in
up '
/home/deepak/.bundle/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/migration.rb:383:in migrate'<br>
/usr/lib/ruby/gems/1.8/gems/padrino-gen-0.9.14/lib/padrino-gen/padrino-tasks/activerecord.rb:136<br>
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in
call '
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in execute'<br>
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in
каждый '
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in execute'<br>
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in
invoke_with_call_chain '
/usr/lib/ruby/1.8/monitor.rb:242:in synchronize'<br>
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
invoke_with_call_chain '
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in invoke'<br>
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in
invoke_task '
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in top_level'<br>
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
каждый '
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in top_level'<br>
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
standard_exception_handling '
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in top_level'<br>
/usr/lib/ruby/gems/1.8/gems/padrino-core-0.9.14/lib/padrino-core/cli/rake.rb:9:in
init '
/usr/lib/ruby/gems/1.8/gems/padrino-core-0.9.14/lib/padrino-core/cli/base.rb:50:in rake'<br>
/usr/lib/ruby/gems/1.8/gems/thor-0.13.4/lib/thor/task.rb:33:in
отправить '
/usr/lib/ruby/gems/1.8/gems/thor-0.13.4/lib/thor/task.rb:33:in run'<br>
/usr/lib/ruby/gems/1.8/gems/thor-0.13.4/lib/thor/invocation.rb:109:in
invoke '
/usr/lib/ruby/gems/1.8/gems/thor-0.13.4/lib/thor/invocation.rb:116:in call'<br>
/usr/lib/ruby/gems/1.8/gems/thor-0.13.4/lib/thor/invocation.rb:116:in
invoke '
/usr/lib/ruby/gems/1.8/gems/thor-0.13.4/lib/thor.rb:137:in start'<br>
/usr/lib/ruby/gems/1.8/gems/thor-0.13.4/lib/thor/base.rb:378:in
start '
/usr/lib/ruby/gems/1.8/gems/thor-0.13.4/lib/thor.rb:124:in start'<br>
/usr/lib/ruby/gems/1.8/gems/padrino-core-0.9.14/bin/padrino:24<br>
/usr/bin/padrino:19:in
load '
/ usr / bin / padrino: 19