Ruby on rails bundle install adding gem - ruby-on-rails

I added bcrypt gem to the Gemfile and ran bundle install command as well as bundle update. The bundle is complete yet when I am working in the console i get the error:
You don't have bcrypt-ruby installed in your application. Please add
it to your Gemfile and run bundle install

bcrypt and bcrypt-ruby are not the same:
https://rubygems.org/search?utf8=%E2%9C%93&query=bcrypt

Related

Error installing nokogumbo gem with specific version

I am trying to do bundle install on my project.
Ruby: 2.5.1
Rails: 5.0.7.2
Bundler: 1.17.3
But when doing the bundle install, it gives me this error with the nokogumbo gem and it doesn't install it, I'm using a mac.enter image description here
Have you tried:
bundle config set force_ruby_platform true
bundle install
Otherwise, paste in your commands and the output so we can see a better view of what is going on.

rails bundler version issue

I have rails project working on Ubuntu.
Now I installed WSL on another machine and cloned the very same project.
Now when I try to install bundler with
gem install bundler
it installed bundler 2.0.2 and on bundle install it gives error:
Could not find gem 'bundler (< 2.0, >= 1.3.0)', which is required by gem 'rails (~> 5.0.0)'
Now I looked at the gemfile.lock it was bundled with 1.16.4, I installed it with
gem install bundler -v '1.16.4'
Now I do a simple bundle install, then it uses 2.0.2, so I have to do
bundle _1.16.4_ install
It completed successfully, but now when I am trying to do rails db:create, it says
The git source https://github.com/activerecord-hackery/ransack.git is not yet checked out. Please run bundle install before trying to start your application
What's wrong here?
Uninstall bundler 2.0.2:
gem uninstall bundler -v 2.0.2
If you still have problem, you can use:
bundle exec rails db:create
You can update to using bundler 2.x if possible with:
bundle update --bundler
This will change the BUNDLED_WITH version in Gemfile.lock.
see: https://bundler.io/guides/bundler_2_upgrade.html
You could also set the default bundler version:
bundler config default 1.16.4
gem list bundler
However I have found this to be a bit error prone.
Try to remove all your gems (go to the gems folder of your ruby, remove the specifications folder and the gems folder),
gem list should be more or less empty
gem install bundler
And try to bundle install again from scratch.

Ruby on Rails bundler: command not found: spring unable to proceed

run bundle install --local
Could not find gem 'rails (= 4.2.6)' in any of the gem sources listed in your
Gemfile.
run bundle exec spring binstub --all
bundler: command not found: spring Install missing gem executables
with bundle install
Please help me solve this issue.
You will probably have Rails version different version of Rails(Its clear that you don't have 4.2.6 installed) installed(your rails project directory), but apparently you has updated it and now your project requires version 4.2.6. Update your gems:
bundle install

downgrading the gem coffee-script-source' to 1.8.0

I am getting this error:
ExecJS::ProgramError in Welcome#indexExecJS::ProgramError in Welcome#index.
According to others posts that error happens because there is a problem with coffee-script-source 1.9.0 running on windows. Actually, I am currently on coffee-script-source 1.10.0. Anyway, apparently, I have to downgrade the gem with the adding
gem 'coffee-script-source', '1.8.0'
to my gem file and runny commands:
bundle update
or
bundle install
Although I am in the directory of the gemfile, I get this message in cmd:
The system cannot find the path specified.
What is it that I am doing wrong?
Apparently, windows did not know how to run bundle command. But using ruby bundle worked and the gemfile was updated.
It seems that bundle is not installed. Therefore, you better install it first by
gem install bundle
and then bundle command works.

Rails could not find gem

when tried to start server rails s i have got
Could not find minitest-5.9.0 in any of the sources
Run `bundle install` to install missing gems.
i did gem install minitest -v 5.9.0
Successfully installed minitest-5.9.0
1 gem installed
also gem list
minitest (5.9.0, 4.7.5)
but when i try rails s again i received the same error.
How could i fix it?
bundle install
If you have tried that, try
bundle update
This will update your gems and your gemfile.lock
Best to specify the version you want in your Gemfile, at present you have 2 versions which will be causing the conflicts.
Something like gem 'minitest ', '~> 5.90' would do the trick. Once you have done this do bundle update this will ensure you update Gemfile to use the correct version of specified gem

Resources