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
Related
I am trying to create new demo rails program, as guide in my book as this command
rails new demo
then it gave me this error
https://imgur.com/rUSzO4B
It said that my problem is
Could not find gem sqlite3 <> 1.4 x86-mingw32 in any of the gem sources listed in your Gem file
and I must run
bundle install
to solve it
I ran bundle install , but nothing changed.
I know my question maybe too easy to solve, but I am very stuck with this, could you please give me some ideas?
From the documentation of the bootsnap gem in rails: "This gem works on macOS and Linux." See: https://github.com/Shopify/bootsnap
They seem to have found a workaround here:
How can I properly install bootsnap on windows
Add or change to gem 'bootsnap', '=1.4.1', require: false to your project Gemfile
I am running rails in windows 10 and when I try to log in I'm getting bcrypt load error. I used to get this error before but I used to solve it. But this time I am not able to. I have tried all the solution by installing bcyrpt gem but nothing is working for me. I am stuck with this. Can anybody help me
I have referred this before
Ruby on windows causes error Cannot load such file bcrypt_ext
For Windows 10, try to use bcrypt 3.1.11
Uninstall older bcrypt and bcrypt-ruby
Install it again by adding following line in Gemfile
gem 'bcrypt', '~> 3.1.11'
Then bundle install
I've been learning Ruby on Rails for the last few days and i'm following tutorials from a book.
I'm working on an app which requires importing bootstrap however i'm having trouble installing it into my project.
I'm using Ruby version 2.3.1 and Rails version 5.1.1 and i'm using the cloud9 coding environment
I create a new app with the following command:
rails new bootstrap_app
The next instruction is to "add the bootstrap gem to the gemfile" with the following command:
gem 'bootstrapâsass' , '~> 3.3.6'
I do this and I get the following error:
ERROR: While executing gem ... (Gem::CommandLineError)
Unknown command bootstrap-sass,
I looked up this error and I found it on stackoverflow here however "restarting the server" didn't work in my case.
The next instruction in the tutorial, is the command
bundle install
I do this and it tells me a list of dependencies that are installed (bootstrap is not listed)
I tried the command gem install bootstrap-sass and it said it installed the gem successfully however when i try to import bootstrap in my CSS file as follows:
#import "bootstrapâsprockets" ;
#import "bootstrap";
i get the following error:
ActionController::RoutingError (No route matches [GET] "/assets/bootstrap%E2%80%90sprockets"):
any ideas on how i can get this working? Thanks
As CD-RUM stated, you will need to add both the gem bootstrap-sass & gem sass-rails in to your Gemfile. I would also suggest adding gem 'sprockets', '2.11.0' as well since the newer version of sprockets that comes with rails 5 has had some issues working well with Bootstrap. Then run bundle install.
You will also want to rename your application.css file to application.scss
and add the import files (#import "bootstrap-sprockets" & #import "bootstrap") there . Now restart your server.
Read through the Ruby on Rails installation instructions here: bootsrap-sass gem & if you're still having issues consider changing the version of the bootstrap-sass gem to an earlier version (I use gem 'bootstrap-sass', '~> 3.3.5.1') since some people seem to experience version conflicts.
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!
I'm using database authentication in devise(current gem) on rails 3 and I get the following error when trying to log in with username/password.
no such file to load -- bcrypt_ext
This error occurred while loading the following files:
bcrypt
bcrypt_ext
I have previously "Successfully installed bcrypt-ruby-2.1.2" gem.
Any ideas? I also tried giving bundler the git repo address and fetching the master, but it doesn't solve the issue.
I had this problem as well. When I installed the gem, the output told me
Building native extensions. This could take a while...
Successfully installed bcrypt-ruby-3.0.1
so I assumed that it had, in fact, built native extensions. But when I went hunting in .../gems/bcrypt-ruby-2.1.4/ext/mri I saw that it not appear to have built anything.
I manually went in and ran
cd [path to your gems folder]/gems/bcrypt-ruby-2.1.4/ext/mri
ruby extconf.rb
make
sudo make install
This did the trick for me.
Do you have these in your Gemfile?
gem "bcrypt-ruby", :require => "bcrypt"
Also -- this issue on devise might apply, check it out
I had the same problem.
add in gemfile:
gem "bcrypt-ruby", '~> 3.0.0'
try bundle install and then bundle update bcrypt-ruby
I had the same issue, i simply deleted the vendor directory and did bundle install.
Fixed the problem. Maybe theres a problem in the make where it won't overwrite.
Check out your Gemfile. See whether you have "bcrpyt-ruby" gem or not. If it is not there then add "bcrpyt-ruby" gem.
gem "bcrypt-ruby", :require => "bcrypt"
I too had the same issue, this resolved it-
gem 'bcrypt', '~> 3.1.9'