downgrading the gem coffee-script-source' to 1.8.0 - ruby-on-rails

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.

Related

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.

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

Could not find testgem-0.1.0 in any of the sources?how to solve this error

On continuation of this question.After bundle install it throws the above error when running the server.link to gitrepo
gemfile
gem 'testgem' , :git => 'https://github.com/praveenitmec/testgem.git'
during bundle install
Using sqlite3 1.3.11
Using testgem 0.1.0 from https://github.com/praveenitmec/testgem.git (at master)
Using turbolinks 2.5.3
while running server
Brillios-Mac-mini:test_app_for ucs brilliomac$ rails s
Could not find testgem-0.1.0 in any of the sources
Run `bundle install` to install missing gems.
Brillios-Mac-mini:test_app_for ucs brilliomac$
Actually the problem is I pushed with gemfile(i.e-testgem-0.1.0.gem) first Thats why it throws this error.
it is not able to build the gem in local because of the gemfile already available.

Ruby on rails bundle install adding gem

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

I'm having trouble running my Rails web server

I have installed ruby193 and I've installed rails via the command prompt (I also installed a DevKit). However, whenever I try the command:
rails server
I get this error:
←[31mCould not find gem 'jquery-rails (>= 0) x86-mingw32' in the gems available
on this machine.←[0m
←[33mRun `bundle install` to install missing gems.←[0m
I've tried a bundle install and it gives me an error with when trying to install the json gem. Any suggestions?
make sure in your Gemfile you are including the right gem (no misspellings, etc)
Looks like you are on Windows.
I defeated the very same problem on Windows by manually installing my gems from Gemfile (gem install gem_to_install). After successfully installing a particular gem I ran bundle check to see what else I need to install. And this way after few installed gems I ran bundle check again and saw the output The Gemfile's dependencies are satisfied.
And then server started. I wish you the same!
P.S. You can install few gems at once: gem install gem1 gem2.

Resources