what does omniauth 1.0.1 do? - omniauth

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

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.

Spree-social and omniauth

I am new to ruby and have spree-ecommerce application on spree .70 . I am trying to add Facebook Authentication using spree-social. Install request fails , when I follow exact steps. Here is what I get:
Could not load 'omniauth'. Please ensure you have the omniauth gem >= 1.0.0 installed and listed in your Gemfile.
I see same error even after running gem install omniauth
I had the same problem but I resolved it by watching the video tutorial at this address http://railscasts.com/episodes/241-simple-omniauth. It shows an introduction to OmniAuth.

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 application as a gem

Suppose I have a rails application. What should I do to create a gem from it and distribute it to heroku (for example)?

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.