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

script/generate devise_install not working #27

Closed
snhrdt opened this issue Nov 8, 2009 · 19 comments
Closed

script/generate devise_install not working #27

snhrdt opened this issue Nov 8, 2009 · 19 comments

Comments

@snhrdt
Copy link

snhrdt commented Nov 8, 2009

Hi everyone,

I installed the latest devise gem (0.4.1) but script/generate devise_install results in the following error:

$ script/generate devise_install
Couldn't find 'devise_install' generator

I wonder whether this is only a problem on my side, or if the generator is missing from the gem ...?

Best regards
Martin Eisenhardt

@josevalim
Copy link
Contributor

I just tried in my computer, using Devise 0.4.2:

rails foo
cd foo
script/generate devise_install

And it worked. It was supposed to work on devise 0.4.1 as well, but try upgrading it to check if it's broken for you or on 0.4.2 as well.

@snhrdt
Copy link
Author

snhrdt commented Nov 8, 2009

Hi Jose,

thanks for the quick reaction.

Sadly, upgrading to 0.4.2 did not resolve the problem:

$ rails foo && cd foo
$ script/generate devise_install
Couldn't find 'devise_install' generator

Sorry for the inconvenience ...

@josevalim
Copy link
Contributor

This is quite odd that it's not working. Which rails are you using? (It won't work with Rails 3/edge...)

@snhrdt
Copy link
Author

snhrdt commented Nov 8, 2009

I am using

  • Devise 0.4.2
  • Warden 0.5.1
  • Rails 2.3.4
  • ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin9]
  • MacOS X 10.5.8

I do not use Rails Edge or Rails 3 ( I am not that fancy ... :-D )

@snhrdt
Copy link
Author

snhrdt commented Nov 8, 2009

BTW: If this only affects me, then please do not bother. Devise is a great piece of code, and you should invest your time into perfecting and extending it.

@carlosantoniodasilva
Copy link
Member

Hello,
I've also tried it here the same way you did:
rails foo && cd foo
script/generate devise_install
And everything is fine.. Have you already tried adding warden and devise to your config.gem before running "script/generate devise_install"?

@snhrdt
Copy link
Author

snhrdt commented Nov 9, 2009

Hi Carlos,

yes, the config.gem lines are in my environment.rb. Devise as such is working, I am able to login and manage user data. It is just that I cannot use the generator to create the devise initializer like everybody else seems to do ... :-(

@carlosantoniodasilva
Copy link
Member

It seems odd... as we can't reproduce here.. are all others Devise generators working fine?

@snhrdt
Copy link
Author

snhrdt commented Nov 9, 2009

I know it is odd. I even removed the gems (Warden and Devise) and re-installed them. And yes, all other generators work fine, including

script/generate devise User

Thanks!

@snhrdt
Copy link
Author

snhrdt commented Nov 9, 2009

Hi everyone, I just scrapped all my gems and reinstalled them via the corresponding rake task. Suddenly, everything works fine.

Strange, but not unwelcomed ... :-D

Thanks for your time, anyway!

@carlosantoniodasilva
Copy link
Member

Great it's working now!
You're welcome..
Closing....

@rubytastic
Copy link

Well after cleaning really all gems * there where some left *
I get this :s

/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in gem_original_require': no such file to load -- subdomain_routes (MissingSourceFile) from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:inrequire'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in require' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:innew_constants_in'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in require' from /Users/pascal/Desktop/Actus/apache2/rubydocs/portal/config/initializers/subdomain_routes.rb:2 from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:inload_without_new_constant_marking'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:in load' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:innew_constants_in'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:in load' from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/initializer.rb:622:inload_application_initializers'
from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/initializer.rb:621:in each' from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/initializer.rb:621:inload_application_initializers'
from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/initializer.rb:176:in process' from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:insend'
from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in run' from /Users/pascal/Desktop/Actus/apache2/rubydocs/portal/config/environment.rb:5 from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:ingem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in require' from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/commands/generate.rb:1 from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:ingem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
from script/generate:3

Anyone a solution?

@carlosantoniodasilva
Copy link
Member

Sorry, but what's the point with Devise?

@rubytastic
Copy link

Never mind, my fault, it was late yesterday, above is fixed

@josevalim
Copy link
Contributor

C'mon guys. Let's work harder on fixing/understanding issues before reporting bugs. Our efforts can be better put in the source code than in the issues tracker. Thanks.

@martinstreicher
Copy link

I had this issue as well (missing all generators). Deleting all versions of the devise gem and reinstalling with rake gems:install cleared the problem. This on Mac OS X.

@ghost
Copy link

ghost commented Oct 18, 2010

i get this problem when i have rails frozen in vendor/rails/
when i remove that directory, it gets rid of my problem, i use windows

@dip00dip
Copy link

Same here. Have 2 versions of devise. devise (1.1.5, 1.0.8)
Can't generate anything.

Here's the solution - just uninstall newer version (for rails 3) and then generate.
Then reinstall it back.

@malclocke
Copy link

This happens because ./script/generate searches the entire gem sources, but only the most recent versions of each. It ignores any values you have defined with config.gem.

So if you, like me, have devise 1.2.1 and 1.0.11 installed, ./script/generate will only look in the 1.2.1 gem for a generators/ directory. See lib/rails_generator/lookup.rb in the rails-2.3.x source.

Anyway, I'd say this is a Rails bug, not really a devise bug.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

7 participants