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

Error running "padrino g admin" #881

Closed
lucassmagal opened this Issue Jul 10, 2012 · 6 comments

Comments

Projects
None yet
6 participants
@lucassmagal

lucassmagal commented Jul 10, 2012

Hello,

I've created a new Padrino project with this command:

 padrino g project todo -d mongoid -t riot -s rightjs -e slim -c less -m rr

Next I added "therubyracer" to Gemfile (because less need it) and then installed the dependencies using "bundle install". So, when I try to generate the admin (padrino g admin), I've got this error:

/home/lsmagalhaes/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/bundler-1.2.0.pre.1/lib/bundler/runtime.rb:68:in `require': cannot load such file -- mongo (LoadError)
from /home/lsmagalhaes/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/bundler-1.2.0.pre.1/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from /home/lsmagalhaes/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/bundler-1.2.0.pre.1/lib/bundler/runtime.rb:66:in `each'
from /home/lsmagalhaes/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/bundler-1.2.0.pre.1/lib/bundler/runtime.rb:66:in `block in require'
from /home/lsmagalhaes/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/bundler-1.2.0.pre.1/lib/bundler/runtime.rb:55:in `each'
from /home/lsmagalhaes/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/bundler-1.2.0.pre.1/lib/bundler/runtime.rb:55:in `require'
from /home/lsmagalhaes/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/bundler-1.2.0.pre.1/lib/bundler.rb:126:in `require'
from /home/lsmagalhaes/Projetos/todo/config/boot.rb:8:in `<top (required)>'
from /home/lsmagalhaes/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/padrino-gen-0.10.7/lib/padrino-gen/generators/cli.rb:27:in `require'
from /home/lsmagalhaes/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/padrino-gen-0.10.7/lib/padrino-gen/generators/cli.rb:27:in `load_boot'
from /home/lsmagalhaes/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/thor-0.15.4/lib/thor/task.rb:27:in `run'
from /home/lsmagalhaes/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/thor-0.15.4/lib/thor/invocation.rb:120:in `invoke_task'
from /home/lsmagalhaes/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `block in invoke_all'
from /home/lsmagalhaes/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `each'
from /home/lsmagalhaes/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `map'
from /home/lsmagalhaes/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `invoke_all'
from /home/lsmagalhaes/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/thor-0.15.4/lib/thor/group.rb:238:in `dispatch'
from /home/lsmagalhaes/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/thor-0.15.4/lib/thor/base.rb:425:in `start'
from /home/lsmagalhaes/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/padrino-gen-0.10.7/bin/padrino-gen:16:in `<main>'

So, what's going wrong?

@Spone

This comment has been minimized.

Show comment
Hide comment
@Spone

Spone Jul 17, 2012

similar issue here, with padrino console or any padrino g

I get:

/usr/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler/runtime.rb:68:in `require': cannot load such file -- mongo (LoadError)
    from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
    from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler/runtime.rb:66:in `each'
    from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler/runtime.rb:66:in `block in require'
    from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler/runtime.rb:55:in `each'
    from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler/runtime.rb:55:in `require'
    from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler.rb:119:in `require'
    from /home/spone/project/config/boot.rb:8:in `<top (required)>'
    from /usr/lib/ruby/gems/1.9.1/gems/padrino-core-0.10.6/lib/padrino-core/cli/base.rb:65:in `require'
    from /usr/lib/ruby/gems/1.9.1/gems/padrino-core-0.10.6/lib/padrino-core/cli/base.rb:65:in `console'
    from /usr/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
    from /usr/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
    from /usr/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor.rb:263:in `dispatch'
    from /usr/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
    from /usr/lib/ruby/gems/1.9.1/gems/padrino-core-0.10.6/bin/padrino:9:in `<top (required)>'
    from /usr/bin/padrino:23:in `load'
    from /usr/bin/padrino:23:in `<main>'

It was working well previously, I'm not sure how I've broken it...

Spone commented Jul 17, 2012

similar issue here, with padrino console or any padrino g

I get:

/usr/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler/runtime.rb:68:in `require': cannot load such file -- mongo (LoadError)
    from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
    from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler/runtime.rb:66:in `each'
    from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler/runtime.rb:66:in `block in require'
    from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler/runtime.rb:55:in `each'
    from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler/runtime.rb:55:in `require'
    from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler.rb:119:in `require'
    from /home/spone/project/config/boot.rb:8:in `<top (required)>'
    from /usr/lib/ruby/gems/1.9.1/gems/padrino-core-0.10.6/lib/padrino-core/cli/base.rb:65:in `require'
    from /usr/lib/ruby/gems/1.9.1/gems/padrino-core-0.10.6/lib/padrino-core/cli/base.rb:65:in `console'
    from /usr/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
    from /usr/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
    from /usr/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor.rb:263:in `dispatch'
    from /usr/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
    from /usr/lib/ruby/gems/1.9.1/gems/padrino-core-0.10.6/bin/padrino:9:in `<top (required)>'
    from /usr/bin/padrino:23:in `load'
    from /usr/bin/padrino:23:in `<main>'

It was working well previously, I'm not sure how I've broken it...

@WaYdotNET

This comment has been minimized.

Show comment
Hide comment
@WaYdotNET

WaYdotNET Jul 18, 2012

Contributor

You need to use mongoid v "2.4.12" because the 3.x.x version has different connection method

gem 'mongoid', '2.4.12'
gem 'bson_ext'

my Gemfile

source :rubygems

# Project requirements
gem 'rake'
gem 'sinatra-flash', :require => 'sinatra/flash'
gem 'therubyracer'

# Component requirements
gem 'bcrypt-ruby', :require => "bcrypt"
gem 'rack-less'
gem 'less'
gem 'slim'
gem 'mongoid', "2.4.12"
gem 'bson_ext'

# Test requirements
gem 'rr', :group => "test"
gem 'riot', :group => "test"
gem 'rack-test', :require => "rack/test", :group => "test"

# Padrino Stable Gem
gem 'padrino', '0.10.7'
Contributor

WaYdotNET commented Jul 18, 2012

You need to use mongoid v "2.4.12" because the 3.x.x version has different connection method

gem 'mongoid', '2.4.12'
gem 'bson_ext'

my Gemfile

source :rubygems

# Project requirements
gem 'rake'
gem 'sinatra-flash', :require => 'sinatra/flash'
gem 'therubyracer'

# Component requirements
gem 'bcrypt-ruby', :require => "bcrypt"
gem 'rack-less'
gem 'less'
gem 'slim'
gem 'mongoid', "2.4.12"
gem 'bson_ext'

# Test requirements
gem 'rr', :group => "test"
gem 'riot', :group => "test"
gem 'rack-test', :require => "rack/test", :group => "test"

# Padrino Stable Gem
gem 'padrino', '0.10.7'
@Spone

This comment has been minimized.

Show comment
Hide comment
@Spone

Spone Jul 18, 2012

Thanks WaydotNET, it solves the problem :)
Do we know when we'll be able to use mongoid 3.x.x with Padrino ?

Spone commented Jul 18, 2012

Thanks WaydotNET, it solves the problem :)
Do we know when we'll be able to use mongoid 3.x.x with Padrino ?

@WaYdotNET

This comment has been minimized.

Show comment
Hide comment
@WaYdotNET

WaYdotNET Jul 18, 2012

Contributor

To work with mongoid 3.x.x , in this moment, i'm use this hack (this is my first time to use mongoid :D:D:D) :

  1. remove mongoid version from Gemfile
gem 'mongoid'
  1. comment all content( or delete) file config/database.rb

  2. create a simple file config/database.yml with

development:
  sessions:
    default:
      database: mongoid
      hosts:
        - localhost:27017
  1. Change in model/account.rb authenticate method in this mode:
def self.authenticate(email, password)
    account = where(email: email).first if email.present?
    account && account.has_password?(password) ? account : nil
  end

and test it :D

This code is very ugly and too simple (the connection method is simple copy&past from mongiid document) but work :D

in this weekend i'm work to patch padrino to work with mongoid 3.x.x

EDIT:

sorry i'm missing this step :

into 'config/boot.rb'

Padrino.before_load do
  Mongoid.load!(File.join(Padrino.root,"config/database.yml"))
end
Contributor

WaYdotNET commented Jul 18, 2012

To work with mongoid 3.x.x , in this moment, i'm use this hack (this is my first time to use mongoid :D:D:D) :

  1. remove mongoid version from Gemfile
gem 'mongoid'
  1. comment all content( or delete) file config/database.rb

  2. create a simple file config/database.yml with

development:
  sessions:
    default:
      database: mongoid
      hosts:
        - localhost:27017
  1. Change in model/account.rb authenticate method in this mode:
def self.authenticate(email, password)
    account = where(email: email).first if email.present?
    account && account.has_password?(password) ? account : nil
  end

and test it :D

This code is very ugly and too simple (the connection method is simple copy&past from mongiid document) but work :D

in this weekend i'm work to patch padrino to work with mongoid 3.x.x

EDIT:

sorry i'm missing this step :

into 'config/boot.rb'

Padrino.before_load do
  Mongoid.load!(File.join(Padrino.root,"config/database.yml"))
end

WaYdotNET added a commit to WaYdotNET/padrino-framework that referenced this issue Jul 18, 2012

@DAddYE DAddYE closed this in 263b3ed Aug 7, 2012

DAddYE added a commit that referenced this issue Aug 7, 2012

Merge pull request #884 from WaYdotNET/patch-mongoid
Now work with Mongoid 2.x and 3.x fix #881
@include

This comment has been minimized.

Show comment
Hide comment
@include

include Aug 15, 2012

hello,

after installing padrino and create a bare project: $ padrino g project model01 -s jquery -d mongoid -b and generated the admin bundle exec padrino g adminI've got this error.

/Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/bundler-1.1.5/lib/bundler/runtime.rb:68:in require': cannot load such file -- mongo (LoadError) from /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/bundler-1.1.5/lib/bundler/runtime.rb:68:inblock (2 levels) in require'
from /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/bundler-1.1.5/lib/bundler/runtime.rb:66:in each' from /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/bundler-1.1.5/lib/bundler/runtime.rb:66:inblock in require'
from /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/bundler-1.1.5/lib/bundler/runtime.rb:55:in each' from /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/bundler-1.1.5/lib/bundler/runtime.rb:55:inrequire'
from /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/bundler-1.1.5/lib/bundler.rb:119:in require' from /Users/include/Documents/dev/Projects/WIMM/tmp/padrino/model01/config/boot.rb:8:in<top (required)>'
from /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/padrino-gen-0.10.7/lib/padrino-gen/generators/cli.rb:27:in require' from /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/padrino-gen-0.10.7/lib/padrino-gen/generators/cli.rb:27:inload_boot'
from /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/thor-0.15.4/lib/thor/task.rb:27:in run' from /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/thor-0.15.4/lib/thor/invocation.rb:120:ininvoke_task'
from /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/thor-0.15.4/lib/thor/invocation.rb:126:in block in invoke_all' from /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/thor-0.15.4/lib/thor/invocation.rb:126:ineach'
from /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/thor-0.15.4/lib/thor/invocation.rb:126:in map' from /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/thor-0.15.4/lib/thor/invocation.rb:126:ininvoke_all'
from /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/thor-0.15.4/lib/thor/group.rb:238:in dispatch' from /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/thor-0.15.4/lib/thor/base.rb:425:instart'
from /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/padrino-gen-0.10.7/bin/padrino-gen:16:in `

'

Then I added mongo gem to Gemfiles and ran bundle install. Ran again the admin generator and I got another error:

=> Problem loading ./config/boot.rb
=> undefined method database=' for Mongoid:Module /Users/include/Documents/dev/Projects/WIMM/tmp/padrino/model01/config/database.rb:12:in<top (required)>'
/Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/padrino-core-0.10.7/lib/padrino-core/reloader.rb:148:in require' /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/padrino-core-0.10.7/lib/padrino-core/reloader.rb:148:insafe_load'
/Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/padrino-core-0.10.7/lib/padrino-core/loader.rb:163:in block in require_dependencies' /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/padrino-core-0.10.7/lib/padrino-core/loader.rb:161:ineach'
/Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/padrino-core-0.10.7/lib/padrino-core/loader.rb:161:in require_dependencies' /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/padrino-core-0.10.7/lib/padrino-core/loader.rb:67:inload!'
/Users/include/Documents/dev/Projects/WIMM/tmp/padrino/model01/config/boot.rb:45:in <top (required)>' /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/padrino-gen-0.10.7/lib/padrino-gen/generators/cli.rb:27:inrequire'
/Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/padrino-gen-0.10.7/lib/padrino-gen/generators/cli.rb:27:in load_boot' /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/thor-0.15.4/lib/thor/task.rb:27:inrun'
/Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/thor-0.15.4/lib/thor/invocation.rb:120:in invoke_task' /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/thor-0.15.4/lib/thor/invocation.rb:126:inblock in invoke_all'
/Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/thor-0.15.4/lib/thor/invocation.rb:126:in each' /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/thor-0.15.4/lib/thor/invocation.rb:126:inmap'
/Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/thor-0.15.4/lib/thor/invocation.rb:126:in invoke_all' /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/thor-0.15.4/lib/thor/group.rb:238:indispatch'
/Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/thor-0.15.4/lib/thor/base.rb:425:in start' /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/padrino-gen-0.10.7/bin/padrino-gen:16:in

'
force .components
create admin
exist admin
create admin/controllers/base.rb
create admin/controllers/sessions.rb
create public/admin
create public/admin/stylesheets/base.css
create public/admin/stylesheets/themes/amro/style.css
create public/admin/stylesheets/themes/bec-green/style.css
create public/admin/stylesheets/themes/bec/style.css
create public/admin/stylesheets/themes/blue/style.css
create public/admin/stylesheets/themes/default/style.css
create public/admin/stylesheets/themes/djime-cerulean/style.css
create public/admin/stylesheets/themes/kathleene/style.css
create public/admin/stylesheets/themes/olive/style.css
create public/admin/stylesheets/themes/orange/style.css
create public/admin/stylesheets/themes/reidb-greenish/style.css
create public/admin/stylesheets/themes/ruby/style.css
create public/admin/stylesheets/themes/warehouse/style.css
create admin/app.rb
append config/apps.rb
apply orms/mongoid
create models/account.rb
create admin/views/accounts
create admin/controllers/accounts.rb
create admin/views/accounts/_form.haml
create admin/views/accounts/edit.haml
create admin/views/accounts/index.haml
create admin/views/accounts/new.haml
insert admin/app.rb
force models/account.rb
create db/seeds.rb
exist admin/controllers
exist admin/views
create admin/views/base
create admin/views/layouts
create admin/views/sessions
create admin/views/base/_sidebar.haml
create admin/views/base/index.haml
create admin/views/layouts/application.haml
create admin/views/sessions/new.haml
insert admin/app.rb
insert Gemfile
gsub admin/views/accounts/_form.haml
gsub admin/controllers/accounts.rb
...

Is this related with this mongoid 2.x, 3.x problem?

thanks in advance

include commented Aug 15, 2012

hello,

after installing padrino and create a bare project: $ padrino g project model01 -s jquery -d mongoid -b and generated the admin bundle exec padrino g adminI've got this error.

/Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/bundler-1.1.5/lib/bundler/runtime.rb:68:in require': cannot load such file -- mongo (LoadError) from /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/bundler-1.1.5/lib/bundler/runtime.rb:68:inblock (2 levels) in require'
from /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/bundler-1.1.5/lib/bundler/runtime.rb:66:in each' from /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/bundler-1.1.5/lib/bundler/runtime.rb:66:inblock in require'
from /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/bundler-1.1.5/lib/bundler/runtime.rb:55:in each' from /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/bundler-1.1.5/lib/bundler/runtime.rb:55:inrequire'
from /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/bundler-1.1.5/lib/bundler.rb:119:in require' from /Users/include/Documents/dev/Projects/WIMM/tmp/padrino/model01/config/boot.rb:8:in<top (required)>'
from /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/padrino-gen-0.10.7/lib/padrino-gen/generators/cli.rb:27:in require' from /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/padrino-gen-0.10.7/lib/padrino-gen/generators/cli.rb:27:inload_boot'
from /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/thor-0.15.4/lib/thor/task.rb:27:in run' from /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/thor-0.15.4/lib/thor/invocation.rb:120:ininvoke_task'
from /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/thor-0.15.4/lib/thor/invocation.rb:126:in block in invoke_all' from /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/thor-0.15.4/lib/thor/invocation.rb:126:ineach'
from /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/thor-0.15.4/lib/thor/invocation.rb:126:in map' from /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/thor-0.15.4/lib/thor/invocation.rb:126:ininvoke_all'
from /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/thor-0.15.4/lib/thor/group.rb:238:in dispatch' from /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/thor-0.15.4/lib/thor/base.rb:425:instart'
from /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/padrino-gen-0.10.7/bin/padrino-gen:16:in `

'

Then I added mongo gem to Gemfiles and ran bundle install. Ran again the admin generator and I got another error:

=> Problem loading ./config/boot.rb
=> undefined method database=' for Mongoid:Module /Users/include/Documents/dev/Projects/WIMM/tmp/padrino/model01/config/database.rb:12:in<top (required)>'
/Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/padrino-core-0.10.7/lib/padrino-core/reloader.rb:148:in require' /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/padrino-core-0.10.7/lib/padrino-core/reloader.rb:148:insafe_load'
/Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/padrino-core-0.10.7/lib/padrino-core/loader.rb:163:in block in require_dependencies' /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/padrino-core-0.10.7/lib/padrino-core/loader.rb:161:ineach'
/Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/padrino-core-0.10.7/lib/padrino-core/loader.rb:161:in require_dependencies' /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/padrino-core-0.10.7/lib/padrino-core/loader.rb:67:inload!'
/Users/include/Documents/dev/Projects/WIMM/tmp/padrino/model01/config/boot.rb:45:in <top (required)>' /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/padrino-gen-0.10.7/lib/padrino-gen/generators/cli.rb:27:inrequire'
/Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/padrino-gen-0.10.7/lib/padrino-gen/generators/cli.rb:27:in load_boot' /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/thor-0.15.4/lib/thor/task.rb:27:inrun'
/Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/thor-0.15.4/lib/thor/invocation.rb:120:in invoke_task' /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/thor-0.15.4/lib/thor/invocation.rb:126:inblock in invoke_all'
/Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/thor-0.15.4/lib/thor/invocation.rb:126:in each' /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/thor-0.15.4/lib/thor/invocation.rb:126:inmap'
/Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/thor-0.15.4/lib/thor/invocation.rb:126:in invoke_all' /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/thor-0.15.4/lib/thor/group.rb:238:indispatch'
/Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/thor-0.15.4/lib/thor/base.rb:425:in start' /Users/include/.rvm/gems/ruby-1.9.3-p194@pan/gems/padrino-gen-0.10.7/bin/padrino-gen:16:in

'
force .components
create admin
exist admin
create admin/controllers/base.rb
create admin/controllers/sessions.rb
create public/admin
create public/admin/stylesheets/base.css
create public/admin/stylesheets/themes/amro/style.css
create public/admin/stylesheets/themes/bec-green/style.css
create public/admin/stylesheets/themes/bec/style.css
create public/admin/stylesheets/themes/blue/style.css
create public/admin/stylesheets/themes/default/style.css
create public/admin/stylesheets/themes/djime-cerulean/style.css
create public/admin/stylesheets/themes/kathleene/style.css
create public/admin/stylesheets/themes/olive/style.css
create public/admin/stylesheets/themes/orange/style.css
create public/admin/stylesheets/themes/reidb-greenish/style.css
create public/admin/stylesheets/themes/ruby/style.css
create public/admin/stylesheets/themes/warehouse/style.css
create admin/app.rb
append config/apps.rb
apply orms/mongoid
create models/account.rb
create admin/views/accounts
create admin/controllers/accounts.rb
create admin/views/accounts/_form.haml
create admin/views/accounts/edit.haml
create admin/views/accounts/index.haml
create admin/views/accounts/new.haml
insert admin/app.rb
force models/account.rb
create db/seeds.rb
exist admin/controllers
exist admin/views
create admin/views/base
create admin/views/layouts
create admin/views/sessions
create admin/views/base/_sidebar.haml
create admin/views/base/index.haml
create admin/views/layouts/application.haml
create admin/views/sessions/new.haml
insert admin/app.rb
insert Gemfile
gsub admin/views/accounts/_form.haml
gsub admin/controllers/accounts.rb
...

Is this related with this mongoid 2.x, 3.x problem?

thanks in advance

@dariocravero

This comment has been minimized.

Show comment
Hide comment
@dariocravero
Contributor

dariocravero commented Dec 27, 2012

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