PDF prawnto are not working with rails 3.2.8 - ruby-on-rails-3

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.

Related

How to setup spree_static_content with spree 3.X and rails 5 to generate static pages

I have been trying to setup gem spree_static_content with spree 3.X and rails 5 but there are endless errors (migrations not running, gem dependencies) which are coming. Documentation is outdated and no help on any of the gems and spree commerce project. If someone has recently used these projects please share the debugging results.
When setting up spree_static_content gem with Rails 5.x and spree 3.x there are various errors you will get when you add only gem spree_static_content to your Gemfile.
Install following gems to your Gemfile and you will not get any error and will easily setup cms for static content for your application.
gem 'spree_static_content', github: 'spree-contrib/spree_static_content'
gem 'globalize', git: 'https://github.com/globalize/globalize'
gem 'activemodel-serializers-xml'
gem 'spree_i18n', github: 'spree-contrib/spree_i18n'
gem 'spree_globalize', github: 'spree-contrib/spree_globalize'
Next, run following commands
bundle install
bundle exec rails g spree_i18n:install
bundle exec rails g spree_globalize:install
bundle exec rails g spree_static_content:install
Now, simply create pages from admin but don't forget to select the store-name checkbox for route to work for spree 3.x.

devise undefined method `users_url' for RegistrationsController

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

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.