I have configured authlogic gem for user management needs by referring https://github.com/jonathandean/authlogic_example. I have configured everything correctly. I am using Rails 3.2.9 and ruby 1.8.7. I am getting the following error when I took localhost:3000
Routing Error
undefined method `filter_parameter_logging' for ApplicationController:Class
Try running rake routes for more information on available routes.
Please help to resolve this. Thanks for any help :)-
I got the problem resolved.
The answer is, in Rails 3, filter_parameter_logging in ActionController is deprecated and has no effect, so remove that line and set ‘config.filter_parameters’ in config/application.rb instead, like this:
config.filter_parameters += [:password, :password_confirmation]
Problem resolved.
Related
Im trying to set up api endpoints for my rails application and keep receiving this error my environment is Ruby 2.6 and Rails 5.2 and im using the 'grape' gem for the api here is the blog I followed to set it up. https://medium.com/#ryanwaldorf/how-to-add-an-api-to-an-existing-rails-app-1d2419ba91bd
here is a link to my repo https://github.com/jslack2537/apiDemoApp
I believe the issue is wither in my config/routes.rb or my application.rb files.
But I could be totally wrong. This is a challenge app and not going to be used in production.
This mainly occurs when naming conventions doesn't match. Try changing api/v1/user.rb to api/v1/users.rb which also the blog suggests. You missed a 's'.
I just installed Ruby 2 and Rails 4, and I created a new project. I made a devise user, and then I went to run the server. I got the error
/Users/michaeldunnegan/.rvm/gems/ruby-2.0.0-p247#rails-4.0.0/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:10:in `rescue in execute_if_updated': Rails::Application::RoutesReloader#execute_if_updated delegated to updater.execute_if_updated, but updater is nil: #<Rails::Application::RoutesReloader:0x007f85ac132458 #paths=["/Users/michaeldunnegan/projects/SoundShare/config/routes.rb"], #route_sets=[#<ActionDispatch::Routing::RouteSet:0x007f85ac188e48>]> (RuntimeError)
I have absolutely no idea what to do. Configuration is pretty weird to me. I think the error might be in my path, whatever that is, but I can't be sure.
My rvm current looks like: ruby-2.0.0-p247#rails-4.0.0, if that's relevant
This is a known bug with rails 4 and devise.
Please see the rails issue on github
I'm building my first Rails app and trying to integrate active_paypal_adaptive_payment with Rails 3.2.1, however when I try to boot up the rails server it runs into the problem of, "undefined method 'class_inheritable_accessor' (in line 4 of post_date.rb) in the activemerchant-1.5.1 gem of which is a dependency.
I've looked around and seems this method has been removed in rails 3.2. From what I understand, it's not as simple as going into the activemerchant gem and replacing class_inheritable_accessor with class_attribute (read this conversation).
Any ideas on how I could update this gem so it could be compatible with Rails 3.2? It's an outstanding issue on the github page so appreciate any help with it!
This particular commit solved my issue: https://github.com/cmezak/active_paypal_adaptive_payment/commit/c6661704c45b73a0be5c608c673b106ac1eb5b69
I've recently tried to use the Vote_fu plugin to do some simple voting on my rails site. I was following this guide https://github.com/vshvedov/vote_fu_rails_3
I was able to download the plugin perfectly fine but when I tried to run rails g vote_fu MymodelName or rake db:migrate, they both returned uninitialized constant Juixe (NameError).
Has anyone else had this problem and do you have any solutions to help me fix it? Thanks for your help!
Edit: The full error is found here http://pastebin.com/3AMGUn44
After I install devise and create a user model. I rake db:migrate and then I rake routes. I then get a error with "undefined method `devise_for' for #". What could be causing this error?
Remember to restart your rails server after installing and configuring devise.
If you have the Devise gem specified in the Gemfile, just make sure you have the following in your routes.rb file:
devise_for :users
Also, here's a trick to make sure Devise is mapped properly, run: rails c, (the Rails app console) in your app's folder and then the following command line:
Devise.mappings.keys
You should see:
=> [:user]
Cheers!
Honestly, I would recommend following these two Railscasts (Episode 209 and Episode 210). The first is a simple and very easy walkthrough for installing Devise and the second is about customizing it to fit your application.
I've watched both episodes and they drastically helped me with Devise, particularly with the customization.
Your best bet is to start from scratch - you'll learn a heck of a lot and have Devise fully installed and functional.
Hope this helps! Good luck.
You may need to do a bundle install