I perform bundle install but it cannot continue because of sqlite3 it always returns to:
Gem::Package::FormatError: no metadata found in C:/RailsInstaller/Ruby1.9.3/lib/
ruby/gems/1.9.1/cache/sqlite3-1.3.4-x86-mingw32.gem
An error occured while installing sqlite3 (1.3.4), and Bundler cannot continue.
Make sure that gem install sqlite3 -v '1.3.4' succeeds before bundling.
How will I resolve this issue?
simply run gem install sqlite3 -v '1.3.4' this should fix the issue. Its because the gem is not included it the list of dependencies so running the command will fix it up
Related
I'm new to Rails, and I'm learning it from The Ruby on Rails Tutorial.
The bundle install command shows this error when I use gem 'sqlite3' in Gemfile;
An error occurred while installing sqlite3 (1.4.2), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.4.2' --source 'https://rubygems.org/'`
succeeds before bundling.
In Gemfile:
sqlite3
I found a solution to this over here - https://medium.com/#declancronje/installing-and-troubleshooting-ruby-on-rails-sqlite3-windows-10-fix-87c8886d03b, that suggested that gem 'sqlite3' should be replaced with gem ‘sqlite3’, git: “https://github.com/larskanis/sqlite3-ruby", branch: “add-gemspec”. On running bundle install after upating Gemfile, all the required gems, including sqlite3, appear to have installed;
Bundle complete! 15 Gemfile dependencies, 70 gems now installed.
Use 'bundle info [gemname]' to see where a bundled gem is installed.
But on running the command sqlite3 --version, I still get the error message that says
'sqlite3' is not recognized as an internal or external command,
operable program or batch file.
I have also referred to various stackoverflow answers, but none of them seem to work. gem install sqlite3 is also not working.
Please help.
try it helped
sudo apt-get install libsqlite3-dev
Trying to execute bundle
$ gem install pg -v '1.1.14' --source 'https://rubygems.org/'
Gem files will remain installed in /home/saishbhende24/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/pg-1.1.4 for inspection.
Results logged to /home/saishbhende24/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/extensions/x86_64-linux/2.6.0-static/pg-1.1.4/gem_make.out
An error occurred while installing pg (1.1.4), and Bundler cannot continue.
Make sure that gem install pg -v '1.1.4' --source 'https://rubygems.org/'succeeds before bundling.
In Gemfile:
pg
saishbhende24#DESKTOP-ELUO53H:/mnt/c/saishrails/r5.1$ gem install pg -v '1.1.14' --source 'https://rubygems.org/'
ERROR: Could not find a valid gem 'pg' (= 1.1.14) in any repository
ERROR: Possible alternatives: pg
Output is rails server
Make sure you have installed postgres for Windows. There are official installers here. Then try again.
Then, if you still experience problems, try manually installing the pg gem first by:
bundle install pg
If you still have trouble you can also look at running rails, postgres, and all your other dependencies like the rest of your gems, redis, etc., on docker. Running ruby on Windows is a notoriously horrible experience. There's many things which aren't as easy as they are on Linux. Docker can solve a lot of those problems for you if you're still having trouble.
gem sources --add https://rubygems.org/
Fixed this issue.
To start I'm pretty new at rails which I'm sure this question will show. I was about to follow the steps on gorails.com to setup a local server. I also use codeanywhere for when I have internet access. When I try to install (rails new myapp) rails I keep getting the following error from my terminal command
extconf failed, exit code 1
Gem files will remain installed in
/var/folders/0d/yx9wdh954jjbn_pnn5nbm5540000gn/T/bundler20190310-64475-5t7xkksqlite3-1.4.0/gems/sqlite3-1.4.0
for inspection.
Results logged to
/var/folders/0d/yx9wdh954jjbn_pnn5nbm5540000gn/T/bundler20190310-64475-5t7xkksqlite3-1.4.0/extensions/universal-darwin-17/2.3.0/sqlite3-1.4.0/gem_make.out
An error occurred while installing sqlite3 (1.4.0), and Bundler cannot
continue.
Make sure that `gem install sqlite3 -v '1.4.0' --source 'https://rubygems.org/'`
succeeds before bundling.
In Gemfile:
sqlite3
run bundle exec spring binstub --all
Could not find gem 'uglifier (>= 1.3.0)' in any of the gem sources listed in your Gemfile.
Run `bundle install` to install missing gems."
Any Help on the matter would be greatly appreciated. Thanks in advance.
Please edit the file in your ruby rails project named Gemfile and change following
gem 'sqlite3'
to
gem 'sqlite3', '~> 1.3.11'
Now run following command to install Gem
bundle install
now run your rails project
rails s
I think you are missing sqlite3.
Run the command
sudo apt-get install -y sqlite3 libsqlite3-dev
Then modify gemfile to
gem 'sqlite3', '~> 1.3.11'
Then run
bundle install
In rails some packages needs to be installed in your local ,after which they can be included in your gemfile. The same applies for mysql and psql.
I'm trying to work on a project that uses the mysql2 gem, version 0.3.17 specifically.
I can get this to install by running:
gem install mysql2 -- --with-mysql-dir=C:\mysql\connector -v '0.3.17'
However after doing this (in the projects directory), and then run bundle install, it fails with the message
An error occurred while installing mysql2 (0.3.17), and Bundler cannot continue. Make sure that `gem install mysql2 -v '0.3.17'` succeeds before bundling.
Is there any way to run something like
bundle install -- --with-mysql-dir=C:\mysql\connector -v '0.3.17'
? I'm guessing I would need to specifiy the mysql2 gem in the command but I've looked on http://bundler.io/v1.3/man/bundle-install.1.html and can't seem to find anything.
My other option would be to simply point it to the gem I've already installed if that's possible.
Thanks in advance.
I am getting the following error when I try to run bundle install
Bundler::GemspecError: Could not read gem at /usr/local/rvm/gems/ruby-1.9.3-p484#rails3tutorial/cache/turbolinks-2.1.0.gem. It may be corrupted.
An error occurred while installing turbolinks (2.1.0), and Bundler cannot continue.
Make sure that `gem install turbolinks -v '2.1.0'` succeeds before bundling.
Even if in install the above said gem and rub bundle install it throws a similar error and asks me to make sure an another gem is installed and this goes on and on.
I am using Rails 4.0.2 and ruby 1.9.3p484.
Maybe the file cache got corrupted. Try:
bundle install --no-cache
If this does not work, delete the cache directory and try again:
rm -rf /usr/local/rvm/gems/ruby-1.9.3-p484#rails3tutorial/cache
bundle install
I just had this problem with the bcrypt gem
Fetching gem metadata from https://rubygems.org/...........
Resolving dependencies...
Bundler::GemspecError: Could not read gem at /data/code/mdweb/vendor/bundle/ruby/2.1.0/cache/bcrypt-3.1.7.gem. It may be
corrupted.
An error occurred while installing bcrypt (3.1.7), and Bundler cannot continue.
Make sure that `gem install bcrypt -v '3.1.7'` succeeds before bundling.
The /data/code/mdweb/vendor/bundle/ruby/2.1.0/cache/bcrypt-3.1.7.gem file was 0 bytes; removing this file or using the --no-cache option didn't help.
Using gem install bcrypt -v '3.1.7' did work, so I copied ~/.gem/ruby/2.1.0/cache/bcrypt-3.1.7.gem to /data/code/mdweb/vendor/bundle/ruby/2.1.0/cache/bcrypt-3.1.7.gem and that allowed me to continue. You could also fetch the .gem file from http://rubygems.org if you can't find it on your system.
I suspect there's some sort of connection issue with bundler (but not with gem for some reason); I suspect DNS since there's an unusual long wait before I get an error, but didn't investigate further.