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.
Related
I'm trying to create a project with mysql as a database, ran command
rails new project_name -d mysql
got the following errors
Could not find gem 'mysql2 (~> 0.5)' in locally installed gems. rails importmap:install
Could not find gem 'mysql2 (~> 0.5)' in locally installed gems. Run bundle install to install missing gems.
rails turbo:install stimulus:install Could not find gem 'mysql2 (~> 0.5)' in locally installed gems.
Run bundle install to install missing gems. "
so i ran
bundle install
but it fails and at the end it tells me
An error occurred while installing mysql2 (0.5.4), and Bundler cannot continue
full error https://pastebin.com/jiX7V0Z0
I'm running windows (all answers I found were for linux or mac), any help is appreciated
Edit : as Christos-Angelos Vasilopoulos mentioned, answer in this issue worked https://github.com/brianmario/mysql2/issues/1210#issuecomment-965862944
what I did was the first two steps
1 - Start a cmd terminal and run ridk explicitely by running:
c:\your path to Ruby31-x64\ridk_use\ridk.cmd enable.
This gives you the right environment to do the rest.
2 - From that cmd, run
gem install mysql2 --platform=ruby -- --with-mysql-dir=c:/your path to Ruby31-x64/msys64/mingw64
(no particular quote was neeeded and I used forward slashes).
It is an open issue with mysql2 though there is a workaround. Check this thread from GitHub the last comment is the thing you need.
how's going?
I trying to create my first application with Ruby on Rails, I can create the project but I can't run the server.
My OS is Windows.
I installed Node, Yarn, Ruby, Rails, Sqlite3.
This message appears when I try to run "rails s"
Could not find gem 'sqlite3' in locally installed gems.
Run `bundle install` to install missing gems.
I run the command "bundle install", "bundle update" and doesn't work. This message appears when I run "bundle install":
An error occurred while installing sqlite3 (1.4.2), and Bundler cannot continue.
In Gemfile:
sqlite3
When I verify the version of sqlite3:
enter image description here
I tried editing Gemfile:
gem 'sqlite3', '~> 1.4.2'
And tried install this way:
gem install sqlite3 -v '1.4.2' --source 'https://rubygems.org/'
I tried this steps too:
https://www.youtube.com/watch?v=cAseoJeNG8I
I follow the recommendation in the documentation for windows users and run "bin/rails s" on Bash, but still the same problem.
I read other answers here to similar questions but did not help me, for this I ask with this.
If something was a miss to you understand the problem please tell me and I provide the information.
Thanks, everyone.
The above Error occurred because sqlite3 is not installed on your system.
Step1:- First, install the sqlite3 on your system by following the steps mention here
Step2:- Run bundle install
Have you tried deleting gemfile.lock? Try delete and after that again type bundle install
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
I am new with ruby on rails. I have successfully installed ruby on rails 4.2 on Ubuntu 14.04 and created a new app, but when I started the server to see if it is working by writing:
rails server
I get this error message:
Could not find gem 'sass-rails (~> 5.0) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.
And when I start to install bundle I get other packages that need to be installed before bundle.
Error message for bundle install
Gem::RemoteFetcher::FetchError: Errno::EHOSTUNREACH: No route to host - connect(2) for "rubygems.global.ssl.fastly.net" port 443 (https://rubygems.org/gems/minitest-5.5.1.gem)
An error occurred while installing minitest (5.5.1), and Bundler cannot
continue.
Make sure that `gem install minitest -v '5.5.1'` succeeds before bundling.
then after I installed minitest and run bundle install
I got this error message
Gem::RemoteFetcher::FetchError: Errno::EHOSTUNREACH: No route to host - connect(2) for "rubygems.global.ssl.fastly.net" port 443 (https://rubygems.org/gems/debug_inspector-0.0.2.gem)
An error occurred while installing debug_inspector (0.0.2), and Bundler cannot
continue.
Make sure that `gem install debug_inspector -v '0.0.2'` succeeds before
bundling.
It keeps showing me packages that I need to install before bundle.
I'm not on Ubuntu, but I find with Rails 4+ this step-wise gem install is the rule rather than the exception. It doesn't seem to handle dependency gem installs very well with bundle. For each of the "missing" dependency gems, run the single gem install, and then the bundle again to see what's next It may reveal another dependency with each step, just install that. (The caveat is if you're seeing the same gems show up as not being installed on every bundle exec, then that's another problem altogether. Once you single-install the gem it should be locked in and available)
$gem install bundle
$gem install name-of-flagged-gem
$gem install bundle
$gem install next-missing-gem
Hope this helps.
Your solution should be right here: SSL Error
I had the same exact problem. Each time I did a "bundle install" it told me to make sure "gem install .... succeeds before bundling" And when I did what it said, it just told me about another gem.
Here is a trouble: on my remote server command gem list shows:
some gems
minitest (4.7.5)
....
bundle show minitest command shows:
/var/lib/gems/1.9.1/gems/minitest-4.7.5
bundle show rails shows the same directory
bundle -v - 1.6.2 (the latest version)
But I've an error: Could not find minitest-4.7.5 in any of the sources (Bundler::GemNotFound)
The steps I've made
Delete Gemfile.lock and bundle install again
Reinstall bundler
Ruby version 2.1.2
Bundle install output shows Using minitest (4.7.5)
On the remote server run gem update bundler and after bundle install.
I think maybe the gems you installed system-wide cause the problem.
You may try bundle package locally, and commit the gems generated in vendor/cache. Pull it on server, and try bundle install —local.
Or, you may just use bundle install --path=vendor/bundle on server.
Give it a try, and hope this can help.