devise undefined method `users_url' for RegistrationsController - devise

Rails 3.2.12 + Devise 2.2.3
A NoMethodError occurred in registrations#create:
undefined method users_url' for #<RegistrationsController:0x007fd04f04b330>
actionpack (3.2.12) lib/action_dispatch/routing/polymorphic_routes.rb:129:inpolymorphic_url'
the app works fine on rails 3.2.8

I had the same problem, it looks a problem inside Devise (still present in master).
The only solution I found was to go back to Devise 2.1.2 (I knew it was working because I used it in another project).
So to fix this problem you can put
gem 'devise', '2.1.2'
in your Gemfile and then re-install it with
rails generate devise:install
Hope it helps you while Devise's team fixes it

Related

Omniauth-facebook rails 3 => invalid credentials error

I am using omniauth-facebook gem in my rails app to authenticate with facebook.
Everything worked fine, but recently i have "invalid credentials" error in my production server. (in local it still works great).
I've read that it is due to the last version of the gem (1.4.1) and downgrading to 1.4.0 should solve the problem.
But it does not work for me and i don't know where to look.
ps: i have rails 3.2.11
Thanks for you help.

PDF prawnto are not working with rails 3.2.8

we are using prawn to generate pdf file in our rails 3 app. Now after upgrading to rails 3.2.8, there is a problem with rails plugin prawnto. Here is the errror:
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them o
ut and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes
for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at D:/rails_proj/
emclab-failed2/config/environment.rb:5)
DEPRECATION WARNING: ActiveSupport::Memoizable is deprecated and will be removed in future releases,simply use Ruby memoization pattern inst
ead. (called from extend at D:/rails_proj/emclab-failed2/vendor/plugins/prawnto/lib/prawnto/template_handler/compile_support.rb:5)
D:/rails_proj/emclab-failed2/vendor/plugins/prawnto/lib/prawnto/template_handlers/base.rb:3:in `<module:TemplateHandlers>': uninitialized co
nstant ActionView::TemplateHandler (NameError)
Even rails server can not be started. Is there a way to fix this problem? thanks.
Prawn is a ruby gem and is not depending on prawnto to work with rails. Here is a post by aniket to use prawn directly in rails 3.2. We followed the instruction and it works in rails 3.2.8 as well. Check it out if you have the same compatible issue with prawnto.

rails 3.2 rails with backbone, can sprockets and requireJs works together?

In the context of a rails 3.2 rails with backbone, can sprockets and requireJs works together? cannot figure it out myself or find on the web.
I think you want to use sprockets OR requirejs, but not both. There is a gem for easy use of requirejs in rails (https://github.com/jwhitley/requirejs-rails/).

what does omniauth 1.0.1 do?

I'm currently trying to use omniauth in my rails application. I was just curious, what does the omniauth 1.0.1 gem do now that the provider strategies come in separate gems like omniauth-facebook?
'omniauth 1.0.1' gem is core library.
'omniauth-facebook' gem is current provider implementation.
Docs

rails-geocoder environmental problem in Rails 3 app

I'm working with Alex Reisner's geocoder gem on a Rails 3 app (3.0.3) because I'm concerned about GeoKit's shakey Rails 3 compatibility. Alex's gem looked perfect for my application so I started using it and had it working flawlessly last night on my Macbook. I pushed the app to Github when I got it running.
Today, I did a git clone of the app on a desktop Mac. Same version of Ruby, Rails and identical source and Gemfile. This time geocoder is throwing this exception:
NameError (uninitialized constant Geocoder::Net):
app/controllers/restaurants_controller.rb:16:in `create'
My models use after_validation :fetch_coordinates to geocode the model upon save.
Has anyone noticed any other dependencies outside the bundle that could cause this? I like the way Alex put this one together but may give geokit-rails3 a try even though it's an unfinished port.
I just released gem version 0.9.7 which should solve this problem.