thoughtbot / clearance

Rails authentication with email & password.
https://thoughtbot.com
MIT License
3.71k stars 467 forks source link

not working out of the box on Ruby 1.9.2 #121

Closed croaky closed 13 years ago

croaky commented 13 years ago

Report from mailing list:

I'm using rails 3.0.3 and ruby 1.9.2 with clearance 0.9.1

rails g clearance
rails g clearance_views

rails console
>Loading development environment (Rails 3.0.3)
no such file to load -- wirble
ruby-1.9.2-p0 > u = User.new
 => #<User id: nil, email: nil, encrypted_password: nil, salt: nil,
confirmation_token: nil, remember_token: nil, email_confirmed: false,
created_at: nil, updated_at: nil>
ruby-1.9.2-p0 > u.password = u.password_confirmation = 'password'
 => "password"
ruby-1.9.2-p0 > u.email = 'larrick@gmail.com'
 => "larrick@gmail.com"
ruby-1.9.2-p0 > u.save
ActionView::Template::Error: ActionView::Template::Error
       from /Users/bob/.rvm/gems/ruby-1.9.2-p0@engine/gems/actionpack-3.0.3/
lib/action_dispatch/routing/route_set.rb:473:in `url_for'
       from /Users/bob/.rvm/gems/ruby-1.9.2-p0@engine/gems/actionpack-3.0.3/
lib/action_dispatch/routing/url_for.rb:131:in `url_for'
       from /Users/bob/.rvm/gems/ruby-1.9.2-p0@engine/gems/actionpack-3.0.3/
lib/action_view/helpers/url_helper.rb:99:in `url_for'
       from /Users/bob/.rvm/gems/ruby-1.9.2-p0@engine/gems/actionpack-3.0.3/
lib/action_dispatch/routing/route_set.rb:195:in
`new_user_confirmation_url'
       from /Users/bob/.rvm/gems/ruby-1.9.2-p0@engine/gems/clearance-0.9.1/
app/views/clearance_mailer/confirmation.html.erb:5:in
`___sers_bob__rvm_gems_ruby_______p__engine_gems_clearance_______app_views_clearance_mailer_confirmation_html_erb___4181672129290726241_2175862960_2330340741431268035'
       from /Users/bob/.rvm/gems/ruby-1.9.2-p0@engine/gems/actionpack-3.0.3/
lib/action_view/template.rb:135:in `block in render'
       from /Users/bob/.rvm/gems/ruby-1.9.2-p0@engine/gems/
activesupport-3.0.3/lib/active_support/notifications.rb:54:in
`instrument'
       from /Users/bob/.rvm/gems/ruby-1.9.2-p0@engine/gems/actionpack-3.0.3/
lib/action_view/template.rb:127:in `render'
       from /Users/bob/.rvm/gems/ruby-1.9.2-p0@engine/gems/actionpack-3.0.3/
lib/action_view/render/rendering.rb:59:in `block in _render_template'
       from /Users/bob/.rvm/gems/ruby-1.9.2-p0@engine/gems/
activesupport-3.0.3/lib/active_support/notifications.rb:52:in `block
in instrument'
       from /Users/bob/.rvm/gems/ruby-1.9.2-p0@engine/gems/
activesupport-3.0.3/lib/active_support/notifications/instrumenter.rb:
21:in `instrument'
       from /Users/bob/.rvm/gems/ruby-1.9.2-p0@engine/gems/
activesupport-3.0.3/lib/active_support/notifications.rb:52:in
`instrument'
       from /Users/bob/.rvm/gems/ruby-1.9.2-p0@engine/gems/actionpack-3.0.3/
lib/action_view/render/rendering.rb:56:in `_render_template'
       from /Users/bob/.rvm/gems/ruby-1.9.2-p0@engine/gems/actionpack-3.0.3/
lib/action_view/render/rendering.rb:26:in `render'
       from /Users/bob/.rvm/gems/ruby-1.9.2-p0@engine/gems/actionpack-3.0.3/
lib/abstract_controller/rendering.rb:114:in `_render_template'
       from /Users/bob/.rvm/gems/ruby-1.9.2-p0@engine/gems/actionpack-3.0.3/
lib/abstract_controller/rendering.rb:108:in `render_to_body'
... 20 levels...
       from /Users/bob/.rvm/gems/ruby-1.9.2-p0@engine/gems/
activerecord-3.0.3/lib/active_record/validations.rb:43:in `save'
       from /Users/bob/.rvm/gems/ruby-1.9.2-p0@engine/gems/
activerecord-3.0.3/lib/active_record/attribute_methods/dirty.rb:21:in
`save'
       from /Users/bob/.rvm/gems/ruby-1.9.2-p0@engine/gems/
activerecord-3.0.3/lib/active_record/transactions.rb:237:in `block (2
levels) in save'
       from /Users/bob/.rvm/gems/ruby-1.9.2-p0@engine/gems/
activerecord-3.0.3/lib/active_record/transactions.rb:289:in `block in
with_transaction_returning_status'
       from /Users/bob/.rvm/gems/ruby-1.9.2-p0@engine/gems/
activerecord-3.0.3/lib/active_record/connection_adapters/abstract/
database_statements.rb:139:in `transaction'
       from /Users/bob/.rvm/gems/ruby-1.9.2-p0@engine/gems/
activerecord-3.0.3/lib/active_record/transactions.rb:204:in
`transaction'
       from /Users/bob/.rvm/gems/ruby-1.9.2-p0@engine/gems/
activerecord-3.0.3/lib/active_record/transactions.rb:287:in
`with_transaction_returning_status'
       from /Users/bob/.rvm/gems/ruby-1.9.2-p0@engine/gems/
activerecord-3.0.3/lib/active_record/transactions.rb:237:in `block in
save'
       from /Users/bob/.rvm/gems/ruby-1.9.2-p0@engine/gems/
activerecord-3.0.3/lib/active_record/transactions.rb:248:in
`rollback_active_record_state!'
       from /Users/bob/.rvm/gems/ruby-1.9.2-p0@engine/gems/
activerecord-3.0.3/lib/active_record/transactions.rb:236:in `save'
       from (irb):4
       from /Users/bob/.rvm/gems/ruby-1.9.2-p0@engine/gems/railties-3.0.3/
lib/rails/commands/console.rb:44:in `start'
       from /Users/bob/.rvm/gems/ruby-1.9.2-p0@engine/gems/railties-3.0.3/
lib/rails/commands/console.rb:8:in `start'
       from /Users/bob/.rvm/gems/ruby-1.9.2-p0@engine/gems/railties-3.0.3/
lib/rails/commands.rb:23:in `<top (required)>'
       from script/rails:6:in `require'
       from script/rails:6:in `<main>'ruby-1.9.2-p0 > exit

No idea what this is about.

Look forward to the day when the mailer stuff is removed from clearance.

jferris commented 13 years ago

Are you missing the :host entry for ActionMailer's default_url_options?

croaky commented 13 years ago

There are four failures in the spec suite when run on Ruby 1.9.2. I think this is an actual issue.

jferris commented 13 years ago

I fixed the four test failures, but only the tests needed to change. If there's an issue with clearance on Ruby 1.9.2, we don't have adequate tests to discover it.

croaky commented 13 years ago

Awesome, thanks.