I installed devise 1.1.rc0 and haven't been able to get it to work in my existing application.
I changed the gem file to gem 'devise' without specifying the version. Ran bundle install. Then ran rail destroy devise_install since that's the command I used to install it.
*Then when I tried to reintall with rails generate devise:install it gives me this error:
gems/activerecord-3.2.8/lib/active_record/dynamic_matchers.rb:50:in method_missing': undefined methoddevise' for # (NoMethodError)*
Ryan Bigg helped me figure out the above error was caused by the user model making a reference to devise, which after the uninstall causes an error. So I removed that reference.
Now I have this error.
gems/activesupport-3.2.8/lib/active_support/inflector/methods.rb:230:in `block in constantize': uninitialized constant User (NameError)
What is this referring to?
You're getting this error because Devise isn't configured, yet your model references it. Remove the call to the devise method (or comment it out) in any model that references it.
I found the same issue when upgrading from 1.8.7 and Rails 3.0.7 to 1.9.3 and Rails 3.2.8. The solution involves removing:
gem 'active_reload'
Related
Environment
Ruby [1.9.3p547]
Rails [3.2.22.5]
Devise [3.0.4]
When i run any rails or rake command for this application it is giving me below error
/config/initializers/devise.rb:3:in <top (required)>': undefined
methodsetup' for Devise:Module (NoMethodError)
If i comment file devise.rb and run rails command again.
/config/initializers/doorkeeper.rb:1:in `':
uninitialized constant Doorkeeper (NameError)
And so on if i comment doorkeeper.rb file it is giving me error for
/config/initializers/kaminari_config.rb:1:in `':
uninitialized constant Kaminari (NameError)
i can't get what is issue with my application i am unable to perform any rake or rails. its directly giving me error of uninitialized constant .
The ruby and rails version is very old. I don't want to upgrade it. Earlier i though it was issue of devise gem. but it must not be issue of devise gem.
Please help me if any one has idea about this type of error.
Thanks in advance
I think you have some installation issues. Please try to install from scratch.
Follow these steps.
Find version of bundler from Gemfile.lock
Install bundler with that version and continue with bundle install
Check for API_KEY and values in your initializers.
Check for Gem support for your Ruby version (as it is too old)
I was trying to install the Ruby Gem Devise and I stupidly overlooked a step. I included the gem in my gemfile then ran the bundle install on the prompt. Then I forgot to run the generator rails generate devise:install.
Then when I went to generate my User model it came up with the following error C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-5.1.4/lib/active_support/inflector/methods.rb:269:inconst_get': uninitialized constant User (NameError)`
I've tried uninstalling the gem and removing anything that refers to Users and reinstalling the gem but it keeps coming up with the same error.
I'm hoping someone can maybe shine a bit of light on this issue
I've just fixed the issue. When you run the bundle install command, it automatically configures the routes folder, so I've removed any reference to devise and it's worked now
I am trying to use the simple-captcha gem with
gem "galetahub-simple_captcha", :require => "simple_captcha".
I am running Rails 5.0.0.1 and Ruby 2.3.2.
I couldn't get it to work in my app so I created a clean skin, rails new, rails generate scaffold User, rake db:migrate etc. As soon as I add the gem, I can bundle install fine, but as soon as I run rails test or rails generate or anything I get this error:
user/.rvm/gems/ruby-2.3.3/gems/galetahub-simple_captcha-0.1.5/lib/simple_captcha/form_builder.rb:7:in `included': uninitialized constant Sprockets::Helpers (NameError)
I have tried following the setup instructions for the gem, which says to run rails generate captcha after installing the gem, but as soon as I have installed the gem I get the error.
Any help would be appreciated.
On the other hand if anyone thinks there is a better captcha I should be using for form submission, let me know.
Looks like latest commit to "simple_captcha" repository was 3 years ago. It's outdated and maybe it will be not worked with Rails 5.
You can use Recaptcha from Google https://github.com/ambethia/recaptcha
You can use Recaptcha gem as advised by Alex
There is nice tutorial for this https://www.sitepoint.com/quick-tip-add-recaptcha-to-your-rails-application/
What happens after the simple captcha is installed?
I installed rails on Windows7 using RailsInstaller (v2.1.0). I found the original rails was v3.2.1. After that, I "gem install spree". It seems the installation upgrades rails to v3.2.7. I mentioned that because before yesterday it was just 3.2.6. Every thing goes well under rails 3.2.6, but if I "spree install" a rails 3.2.7 app, I failed to access the default store's Cart. And get the error like this:
NoMethodError in Spree::OrdersController#edit
undefined method `password_salt=' for #<Spree::User:0x68438d0>
As I checking the database, yes, there is no "password_salt" but only "salt" in spree_users table.
Is there anyone else encountered this problem? I had taken almost half day on this problem. Did I miss something in the Spree path?
Thanks very much.
I think I had the exact same issue before, see if specifying spree gem version (assuming is 1.1.2) in the Gemfile and then running bundle update works
#Gemfile
gem 'spree', '1.1.2'
and later run
bundle update
See if it works!
I am trying to use ActiveAdmin with rails 3.1, but I get the following error during rails generate active_admin:install I get the following:
gems/activeadmin-0.3.0/lib/active_admin/namespace.rb:176:in `eval': uninitialized constant InheritedResources::Base (NameError)
This happens with any generate/destroy commands now. I have made sure that I have added the required 3.1 gems (sass-rails and meta_search) per the install instruction on the github wiki. Does anyone have any ideas?
I ran into this too. Jose Valim released a new version 1.3.0 of the inherited_resources gem, and ActiveAdmin didn't pin the gem to the previous version 1.2.2. I was able to fix this issue by adding the following line to my gemfile:
gem "inherited_resources", "1.2.2"