Devise Invitable - Could not find generator 'devise_invitable:install' - ruby-on-rails

I'm trying to setup scambra devise_invitable in my rails 5 project. After setting up the gem and bundle install, When I run the first command for the initial setup -
rails generate devise_invitable:install I get the following error.
Expected boolean default value for '--markerb'; got :erb (string)
Could not find generator 'devise_invitable:install'.
Maybe you meant 'devise:install', 'annotate:install' or 'responders:install'
This is my gemfile.
gem 'devise', github: 'plataformatec/devise', branch: 'master'
gem 'devise_invitable', '~> 1.7.2'
How do I fix this?

Okay. I restarted my laptop and it worked. Weird. Solution suggested from github found here. https://github.com/scambra/devise_invitable/issues/579

I tried with restarting and not worked in my case ruby 2.5.1 rails 5.2.3 dell xps ubuntu 18.04.
What worked is:
bundle exec gem install devise_invitable
then I saw that it installed version:
Successfully installed devise_invitable-2.0.1
Parsing documentation for devise_invitable-2.0.1
Done installing documentation for devise_invitable after 0 seconds
1 gem installed
so I updated Gemfile line to correct version:
gem 'devise_invitable', '~> 2.0.1'
and then run rails generate devise_invitable user successfully!

Related

is there any specific generator i need to install so that devise can work in ruby on rails?

I have been trying to add the device gem in my rails app so I added
gem 'devise' to my gem file and i ran
bundle install
but when i'm trying to run
rails generate devise:install
I'm getting this error:
Could not find generator 'devise:install'. Maybe you meant 'assets', 'generator' or 'coffee:assets'
what should i do to make it install?
The better way to add gem is going to https://rubygems.org and search specify gem
for your situation you should add gem 'devise', '~> 4.7', '>= 4.7.1' to your Gemfile, then go back to console type bundle install
is it maybe just error you wrote "bunBle install", you should use 'bundle install' also check result after you run this command if everything is okay and run this command to be sure devise is installed 'gem list --local devise'

Add Gem 'wdm' to your GemFile

Error
I have tried running the following command in git bash
rails g scaffold_controller oragnizationsController
And I get the error in the picture.
I have tried multiple solutions:
1- Tried running
gem install wdm
2- Tried running
bundle install
3- I have tried adding
gem 'wdm', '~> 0.1.0'
and
gem 'wdm', '~> 0.1.1'
since I read that 0.1.0 ain't working anymore.
But the problem hasn't been solved yet. I am using windows 10, ruby 2.3.3, rails 5.1.4
Uninstall wdm gem and put it to the gemfile like this:
gem 'wdm' if Gem.win_platform?
Or like the error tells you
The message about wdm is misleading here. It seems to be just a notice/warning.
If you look closer, you'll see that the actual error message is printed in the line below that. It says:
cannot load such file -- bcrypt_ext (LoadError)
Then see here: Ruby on windows causes error Cannot load such file bcrypt_ext

Bcrypt - Ruby on Rails with Devise - Windows issue

I'm having problems with bcrypt when either trying to start my rails server or attempting to login on the localhost.
I have played around by re-downloading/updating my Gem file with different versions of bcrypt and moving files around as per some of the github issues raised around this.
At the moment, my rails server starts, and when I login I get the error:
cannot load such file — 2.3/bcrypt_ext
And my Gem file has: gem 'bcrypt-ruby', '~> 3.0.0'
Any thoughts to get this working consistently on Windows?
Came across this github issue and the following seems to work
Firstly uninstall bcrypt and bcrypt-ruby by running these two commands:
gem uninstall bcrypt and gem uninstall bcrypt-ruby
Install it again with gem install bcrypt --platform=ruby
In your Gemfile write gem 'bcrypt-ruby', '3.1.5', :require => 'bcrypt'
Run bundle install
Okay I got this working by referring to the following answer: https://stackoverflow.com/a/33593911/6676900
The key steps are as follows:
1. Install Devkit from - http://rubyinstaller.org/downloads/ (NOTE: I had to use the 32 bit version even though I am running Windows 10 64 Bit)
2. Update my PATH variable to use the 32bit version of the Dev kit. i.e. %DEVKIT_HOME%\bin (Where %DEVKIT_HOME% is the location of the extracted Dev Kit)
3. Follow the commands in the following answer: https://stackoverflow.com/a/33593911/6676900
Good to go!

Error when installing devise- i am a novice

I have installed rails and am running Git Bash and am on Windows 7 64 bit, i have installed gemfile and updated and this is my first use of ruby! I am following the instrustions from devise's github: https://github.com/plataformatec/devise . I am probably being very stupid but when i run gem 'devise' and this error occurs:
ERROR: while executing gem... <Gem::commandlinerror> unknown command /devise
Any help would be greatly appreciated
i think you are not installing gem properly.
gem install command is gem install devise
or perhaps you should add the gem to your Gemfile like this
gem "devise"
and then run this command in your terminal
bundle install
If you are running gem 'devise' then it won't work because its not a valid command.
You should give
gem install devise
or
Include gem 'devise' in Gemfile and run bundle install

Rails 4 - Bundle error for obfuscate_id gem

I am trying to $bundle install the obfuscate_id gem into my Rails 4 application, but I am coming across an error:
It says it's dependent on Rails > 3.2.1, but I have Rails 4.0.2. Am I wrong in assuming this should work? Have I missed something?
The gem: https://github.com/namick/obfuscate_id
Thanks,
Michael.
I had the same issue. RubyGems doesn't seem to have the most recent version, so I installed the gem from Github, which resolved it. Put the following code in your file:
gem 'obfuscate_id', :git => 'https://github.com/namick/obfuscate_id.git'

Resources