1
votes
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
    Master:blog shaunstanislaus$ bundle update
    Fetching gem metadata from https://rubygems.org/.........
    Fetching gem metadata from https://rubygems.org/..
    Enter your password to install the bundled RubyGems to your system: 
    Using rake (0.9.2.2) 
    Enter your password to install the bundled RubyGems to your system: 
    Using i18n (0.6.0) 
    Using multi_json (1.3.6) 
    Using activesupport (3.2.6) 
    Using builder (3.0.0) 
    Using activemodel (3.2.6) 
    Using erubis (2.7.0) 
    Using journey (1.0.4) 
    Using rack (1.4.1) 
    Using rack-cache (1.2) 
    Using rack-test (0.6.1) 
    Using hike (1.2.1) 
    Using tilt (1.3.3) 
    Using sprockets (2.1.3) 
    Using actionpack (3.2.6) 
    Using mime-types (1.19) 
    Using polyglot (0.3.3) 
    Using treetop (1.4.10) 
    Using mail (2.4.4) 
    Using actionmailer (3.2.6) 
    Using arel (3.0.2) 
    Using tzinfo (0.3.33) 
    Using activerecord (3.2.6) 
    Using activeresource (3.2.6) 
    Using bson (1.6.4) 
    Using bson_ext (1.6.4) 
    Using bundler (1.1.5) 
    Using coffee-script-source (1.3.3) 
    Using execjs (1.4.0) 
    Using coffee-script (2.2.0) 
    Using rack-ssl (1.3.2) 
    Using json (1.7.4) 
    Using rdoc (3.12) 
    Using thor (0.15.4) 
    Using railties (3.2.6) 
    Using coffee-rails (3.2.2) 
    Using jquery-rails (2.0.2) 
    Using mongo (1.0.9) 
    Using will_paginate (3.0.3) 
    Using mongoid (2.0.0.beta.19) 
    Using rails (3.2.6) 
    Using sass (3.1.20) 
    Using sass-rails (3.2.5) 
    Using sqlite3 (1.3.6) 
    Using uglifier (1.2.7) 
    Your bundle is updated! Use `bundle show [gemname]` to see where a bundled gem is                         installed.
    Master:blog shaunstanislaus$ rails g mongoid:config
    /Library/Ruby/Gems/1.8/gems/railties-3.2.6/lib/rails/railtie/configuration.rb:85:in

method_missing': undefined methodgenerators' for #
(NoMethodError) from /Library/Ruby/Gems/1.8/gems/mongoid-2.0.0.beta.19/lib/mongoid/railtie.rb:13 from /Library/Ruby/Gems/1.8/gems/mongoid-2.0.0.beta.19/lib/mongoid.rb:89:in require' from /Library/Ruby/Gems/1.8/gems/mongoid-2.0.0.beta.19/lib/mongoid.rb:89 from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:68:in require' from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:68:in require' from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:66:in each' from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:66:in require' from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:55:in each' from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:55:in require' from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler.rb:119:in require' from /Users/shaunstanislaus/Desktop/code/blog/config/application.rb:7 from /Library/Ruby/Gems/1.8/gems/railties-3.2.6/lib/rails/commands.rb:24:in require' from /Library/Ruby/Gems/1.8/gems/railties-3.2.6/lib/rails/commands.rb:24 from script/rails:6:inrequire' from script/rails:6

how do i fix this?

i entered this command and error appears above.

Master:blog shaunstanislaus$ rails g mongoid:config

I have done trying to remove gemfile.loc bundle install rails g mongoid:config, came out this error again. still the same.

Master:blog shaunstanislaus$ rails g mongoid:config

/Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:68:in require': /Library/Ruby/Gems/1.8/gems/mongoid-3.0.3/lib/mongoid.rb:148: odd number list for Hash (SyntaxError) { to: Config })) ^ /Library/Ruby/Gems/1.8/gems/mongoid-3.0.3/lib/mongoid.rb:148: syntax error, unexpected ':', expecting '}' { to: Config })) ^ from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:68:inrequire' from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:66:in each' from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:66:inrequire' from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:55:in each' from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:55:inrequire' from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler.rb:119:in require' from /Users/shaunstanislaus/Desktop/code/blog/config/application.rb:7 from /Library/Ruby/Gems/1.8/gems/railties-3.2.6/lib/rails/commands.rb:24:inrequire' from /Library/Ruby/Gems/1.8/gems/railties-3.2.6/lib/rails/commands.rb:24 from script/rails:6:in `require' from script/rails:6

3
Remove your GemFile.lock, run bundle install. If you're running on the latest version of Rails (3.2?) and Ruby (1.9.3-p###) it should work. Check this out: stackoverflow.com/questions/10477182/…Dominic Tancredi

3 Answers

0
votes

Remove your GemFile.lock, run bundle install. If you're running on the latest version of Rails (3.2?) and Ruby (1.9.3-p###) it should work.

The reason the "generator" commands for Mongoid isn't showing is most likely that the gem didn't install properly for the version of rails and ruby you have.

Check this out: Rails g failing for mongoid commands… – Dominic Tancredi 2

0
votes

I have this set up

ruby -v

ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin12.0.0]

bundle -v

Bundler version 1.1.5

bundle install succeeds; rake server still gives the error

/Users/avaranovich/.gem/gems/bundler-1.1.5/lib/bundler/runtime.rb:68:in `require': /Users/avaranovich/.gem/gems/mongoid-3.0.4/lib/mongoid.rb:148: odd number list for Hash (SyntaxError) { to: Config }))

0
votes

I fixed this with typing bundle exec rails g mongoid:config