0

我有使用 Erb 作为模板引擎和 Mongoid 作为 Object-Document-Mapper 的 Padrino 项目女巫。

我正在尝试通过以下命令为我的 Padrino 项目创建管理应用程序

padrino g admin -e erb

但我收到一个错误

/home/vadim/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:297:in `initialize': No such file or directory - /home/vadim/projects/interierka/heroku/.components (Errno::ENOENT)
from /home/vadim/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:297:in `open'
from /home/vadim/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:297:in `load_file'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/padrino-gen-0.10.7/lib/padrino-gen/generators/actions.rb:120:in `retrieve_component_config'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/padrino-gen-0.10.7/lib/padrino-gen/generators/actions.rb:101:in `store_component_choice'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/padrino-admin-0.10.7/lib/padrino-admin/generators/admin_app.rb:53:in `create_admin'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/task.rb:27:in `run'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:120:in `invoke_task'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `block in invoke_all'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `each'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `map'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `invoke_all'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/group.rb:238:in `dispatch'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/base.rb:425:in `start'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/padrino-gen-0.10.7/lib/padrino-gen/generators/cli.rb:51:in `setup'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/task.rb:27:in `run'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:120:in `invoke_task'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `block in invoke_all'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `each'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `map'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `invoke_all'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/group.rb:238:in `dispatch'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/base.rb:425:in `start'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/padrino-gen-0.10.7/bin/padrino-gen:16:in `<main>'

我正在尝试创建 .components 文件,但出现另一个错误

/home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/padrino-gen-0.10.7/lib/padrino-gen/generators/actions.rb:102:in `store_component_choice': undefined method `[]=' for false:FalseClass (NoMethodError)
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/padrino-admin-0.10.7/lib/padrino-admin/generators/admin_app.rb:53:in `create_admin'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/task.rb:27:in `run'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:120:in `invoke_task'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `block in invoke_all'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `each'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `map'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `invoke_all'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/group.rb:238:in `dispatch'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/base.rb:425:in `start'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/padrino-gen-0.10.7/lib/padrino-gen/generators/cli.rb:51:in `setup'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/task.rb:27:in `run'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:120:in `invoke_task'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `block in invoke_all'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `each'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `map'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `invoke_all'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/group.rb:238:in `dispatch'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/base.rb:425:in `start'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/padrino-gen-0.10.7/bin/padrino-gen:16:in `<main>'
4

1 回答 1

0

错误是由于我已将项目文件移动到另一个文件夹而忘记了 .* 文件。

.components 文件在您创建 Padrino 项目时创建,其中包含有关项目中使用的组件的信息。

我的 .components 文件的内容:

---
:orm: mongoid
:test: none
:mock: none
:script: jquery
:renderer: erb
:stylesheet: none
于 2012-10-01T08:38:48.840 回答