Skip to content
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

Rails 3: rails g scaffold doesn't work #9

Merged
merged 1 commit into from
Sep 15, 2011
Merged

Rails 3: rails g scaffold doesn't work #9

merged 1 commit into from
Sep 15, 2011

Conversation

trollixx
Copy link
Contributor

@trollixx trollixx commented Sep 4, 2011

In latest Rails 3 (release candidate) when 'rails g scaffold' is called I get the following error:

Corsica:enumtest $ rails g scaffold
/Users/basti/.rvm/gems/ruby-1.8.7-p174/bundler/gems/enumerated_attribute-c5e2944/lib/enumerated_attribute/rails_helpers.rb:26:in `require': no such file to load -- rails_generator (LoadError)
from /Users/basti/.rvm/gems/ruby-1.8.7-p174/bundler/gems/enumerated_attribute-c5e2944/lib/enumerated_attribute/rails_helpers.rb:26
from /Users/basti/.rvm/gems/ruby-1.8.7-p174/bundler/gems/enumerated_attribute-c5e2944/lib/enumerated_attribute/attribute.rb:7:in `require'
from /Users/basti/.rvm/gems/ruby-1.8.7-p174/bundler/gems/enumerated_attribute-c5e2944/lib/enumerated_attribute/attribute.rb:7
from /Users/basti/.rvm/gems/ruby-1.8.7-p174/bundler/gems/enumerated_attribute-c5e2944/lib/enumerated_attribute.rb:3:in `require'
from /Users/basti/.rvm/gems/ruby-1.8.7-p174/bundler/gems/enumerated_attribute-c5e2944/lib/enumerated_attribute.rb:3
from /Users/basti/.rvm/gems/ruby-1.8.7-p174/gems/bundler-1.0.0.rc.1/lib/bundler/runtime.rb:64:in `require'
from /Users/basti/.rvm/gems/ruby-1.8.7-p174/gems/bundler-1.0.0.rc.1/lib/bundler/runtime.rb:64:in `require'
from /Users/basti/.rvm/gems/ruby-1.8.7-p174/gems/bundler-1.0.0.rc.1/lib/bundler/runtime.rb:62:in `each'
from /Users/basti/.rvm/gems/ruby-1.8.7-p174/gems/bundler-1.0.0.rc.1/lib/bundler/runtime.rb:62:in `require'
from /Users/basti/.rvm/gems/ruby-1.8.7-p174/gems/bundler-1.0.0.rc.1/lib/bundler/runtime.rb:51:in `each'
from /Users/basti/.rvm/gems/ruby-1.8.7-p174/gems/bundler-1.0.0.rc.1/lib/bundler/runtime.rb:51:in `require'
from /Users/basti/.rvm/gems/ruby-1.8.7-p174/gems/bundler-1.0.0.rc.1/lib/bundler.rb:109:in `require'
from /Users/basti/dev/rails3/enumtest/config/application.rb:7
from /Users/basti/.rvm/gems/ruby-1.8.7-p174/gems/railties-3.0.0.rc/lib/rails/commands.rb:15:in `require'
from /Users/basti/.rvm/gems/ruby-1.8.7-p174/gems/railties-3.0.0.rc/lib/rails/commands.rb:15
from script/rails:6:in `require'
from script/rails:6

@exceed
Copy link

exceed commented Oct 18, 2010

I second this. Same behavior with Ruby 1.9.2

@rweng
Copy link

rweng commented Nov 18, 2010

+1

@khelal
Copy link

khelal commented Jan 16, 2011

Same here in Rails 1.8.7 (REE)

@matteomelani
Copy link

Same here with Ruby 1.9.2

@Nsm
Copy link

Nsm commented Feb 22, 2011

Please pull the changes in https://github.com/edave/enumerated_attribute to fix this

@levity
Copy link

levity commented Mar 14, 2011

Nsm's fix works. However, that whole ARGV test is... well...

Let's just say, this bug popped up for me only because I was running rspec and one of my test files has the word "scaffold" in its name.

@rosskevin
Copy link

edave's changes worked for me with rails 3.1rc4

gem "edave-enumerated_attribute", :git => "https://github.com/edave/enumerated_attribute.git"

@turadg
Copy link
Contributor

turadg commented Aug 17, 2011

Anyone like to file a pull request?

I'd take the commits from @edave but they change the gem to edave-enumerated_attribute and the new gemspec throws warnings during bundle update.

@raston
Copy link

raston commented Sep 15, 2011

trollixx's patch fixes this for me on Rails 3.1. Use this in your Gemfile:

gem "enumerated_attribute", :git => "https://github.com/trollixx/enumerated_attribute.git"

@sylario
Copy link

sylario commented Sep 15, 2011

I replaced
gem 'enumerated_attribute'
with
gem "enumerated_attribute", :git => "https://github.com/trollixx/enumerated_attribute.git"

and ran bundle update
But now i have those errors :
undefined method `enum_attr' for #Class:0xa88a428

Is there another step when you use git repos as gems?

turadg added a commit that referenced this pull request Sep 15, 2011
Compatibility with Generator in Rails 3
@turadg turadg merged commit 3d827b0 into jeffp:master Sep 15, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.