I have installed Instant Rails 2.0. While trying to upgrade RubyGems I run the command gem install update. It fails giving following error.
C:\Users\Owner\Downloads\InstantRails-2.0-win\rails_apps>gem install update
ERROR: While executing gem ... (Gem::RemoteSourceException)
HTTP Response 302 fetching http://gems.rubyforge.org/yaml
Also it is giving same error while executing gem update -- system. or any other gem command.
Try to install a more recent gem version from http://gems.rubyforge.org/
Related
I have been trying to install rubygems by using the command gem install rubygems in the command prompt but I keep getting the following errors:
ERROR: Could not find a valid gem 'rubygems' (>= 0) in any repository
ERROR: Possible alternatives: ruby_gem, ruby_gs, rubyless, rubyjams, rubygene
The problem is that you are trying to use RubyGems to install RubyGems.
The gem command is powered by the RubyGems-gem. Since you can use it, it appears you already have it installed on your system.
In case you want to update use: gem update --system.
If you currently have RubyGems 1.1 or 1.2 on your system, please see "Download RubyGems" which recommends these commands:
gem install rubygems-update
update_rubygems
I'm trying to deploy Zipsell with heroku. However when I run through the heroku and ruby setup and try to deploy via:
git clone https://github.com/yongfook/zipsell
cd zipsell
./bin/setup
I get the error message:
An error occurred while installing pg (1.0.0), and Bundler cannot continue.
Make sure that gem install pg -v '1.0.0' --source 'https://rubygems.org/' succeeds before bundling.
In Gemfile:
pg
I have run through the setup process now multiple times and reinstalled all but still am not able to deploy. Any idea what is going wrong?
From the repo you posted it seems the error message is very clear. From the Gemfile of the repo you shared it seems you haven't install pg which is the postgresql (You will need to remove sqlite.
The problem is that there are some missing dependencies that you don't have installed and that why the error is thrown. There is the concepts of gems which is packaged code. https://rubygems.org/ via the following website you can find some of the gems you'r missing. There is also the versions which have to be compatible.
What you'll do is search for the missing gems shown in the error message. Check for the correct version if you the gem in your Gemfile but the version is conflicting.
https://github.com/yongfook/zipsell/blob/master/Gemfile
bundle update
install the missing gems
gem install pg
and so on. Or do it straight in the Gemfile.
I am trying to install sass on my Windows 10 PC using cli by typing command.
gem install sass
But after little delay it throws below error.
ERROR: Could not find a valid gem 'sass' (>= 0), here is why: Unable to download data from https://rubygems.org/ - timed out (https://api.rubygems.org/specs.4.8.gz)
Ruby is installed in my PC version is:
ruby 2.5.0p0 (2017-12-25 revision 61468) [x64-mingw32]
Gem version is 2.7.3
Try installing all the sources first by running the below command:
gem sources -a http://rubygems.org/
If the error persists, try removing the proxy. Your proxy server might be blocking the request.
Here is the error message:
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb
Gem files will remain installed in /var/www/app_dir/shared/bundle/ruby/1.8/gems/bson_ext-1.7.0 for inspection.
Results logged to /var/www/app_dir/shared/bundle/ruby/1.8/gems/bson_ext-1.7.0/ext/cbson/gem_make.out
An error occured while installing bson_ext (1.7.0), and Bundler cannot continue.
Make sure that `gem install bson_ext -v '1.7.0'` succeeds before bundling.
I tried running gem install bson_ext -v '1.7.0' and this succeeded with no errors. I've tried installing ruby-dev and ruby1.8-dev apt packages and this did not help.
bundle install is able to successfully build bson_ext on my Mac OS X development system but is failing in the Linux production environment even when I run it directly outside of the context of the capistrano bundle:install task.
I have also tried running gem update --system and gem update bundler and this didn't help.
I suspect the issue lies in how bundle install is called on the target system. Still, I tried updating Capistrano to version 2.13.5 and this did not help.
So, it appears that bundler 1.2.1 is is unable to build the following gems on my system:
bson_ext 1.7.0
curb 0.8.3
nokogiri 1.5.5
json 1.7.5
therubyracer 0.8.2.
I was able to build these using gem install <GEMNAME> -v '<VERSION>' --install-dir /var/www/<APP_DIR>/shared/bundle/ruby/1.8/. After this, running bundle exec capistrano deploy succeeded.
bundle does not appear to be able to build gems with native extensions on my system. Not sure why, but maybe this procedure will help those with a similar issue.
Why do I get this error every time I type gem install gem_name?
ERROR: While executing gem ... (Gem::RemoteSourceException)
HTTP Response 302 fetching http://gems.rubyforge.org/yaml
gem -v = 1.0.1, ruby -v = 1.8.6
gem 1.0.1 is very old, you should update it first.
Probably
gem --update system
is also broken, so you should install a new version manually.
And this is probably the same question.