Installing rake - ruby

we tried to install rake on our pc but there were following errors.. We even tried updating gems but in vain. We need to run some tasks on rake and dont know how to go abt it.
C:\Documents and Settings\nemanich\My Documents\gems>gem install rake-compi 0
.7.0.gem
ERROR: http://gems.rubyforge.org/ does not appear to be a repository
ERROR: Error installing rake-compiler-0.7.0.gem:
rake-compiler requires RubyGems version >= 1.3.5
C:\Documents and Settings\nemanich\My Documents\gems>gem install update_rubygems
.gem
ERROR: http://gems.rubyforge.org/ does not appear to be a repository
ERROR: could not find gem update_rubygems.gem locally or in a repository

Are you behind a proxy server? If so, set your HTTP_PROXY environment variable appropriately. This is the sort of error you get when the repository can't be contacted. For example:
set HTTP_PROXY=http://proxy.mycompany.com:8888
will set it temporarily.

I don't think that's the command to update RubyGems. Have you tried gem update --system? You might be able to install Rake after that.

Related

tootlcrl error: Could not find concurrent-ruby-1.1.10 in any of the sources

I'm trying to run a tootctl command, but am running into a problem with it not being able to detect the required dependency is not present.
Could not find concurrent-ruby-1.1.10 in any of the sources
I have run bundle install and the gems get installed (or are confirmed already installed), but the command still has trouble not finding the
Using concurrent-ruby-1.1.10
...dozens of other packages
Using rails-settings-cached 0.6.6
Bundle complete! 122 Gemfile dependencies, 225 gems now installed.
Gems in the groups 'development' and 'test' were not installed.
Bundled gems are installed into `../vendor/bundle`
then I attempt the command again..
me#mastodon-vm:/var/www/mastodon/bin$ ./tootctl media remove --days=7
Could not find concurrent-ruby-1.1.10 in any of the sources
Run `bundle install` to install missing gems.
me#mastodon-vm:/var/www/mastodon/bin$
but I'm back to the same problem. What is the typical approach to fix this?
Note: I did try to follow the guidance in this SO post, but it broke the entire installation. I was able to save it by replacing Gemfile and Gemfile.lock from Mastodon's source (phew)
Your log shows
Gems in the groups 'development' and 'test' were not installed.
Try to install your Gems with
bundle install --with development test
or run
RAILS_ENV=production tootctl
According to https://rubygems.org/gems/concurrent-ruby/versions/1.1.10 the gem is named "concurrent-ruby". When I run gem install concurrent-ruby, it is installed successfully on my computer.

Unable to download from rubygems.org

I just installed ruby version 2.3.0p0 using the ruby installer for windows and was trying to install bundler. When I run gem install bundler I get the following error:
Could not find a valid gem 'bundler' (>=0), here is why
Unable to download data from (link removed) rubygems -Errno:ETIMEDOUT:
Failed to open TCP connection to api.rubygems.org:443 (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. -connect(2) for "api.rubygems.org" port 443)(https://api.rubygems.org/specs.4.8.gz)
Some research led me to try running gem install --http-proxy http://[user]:[password]#[server]:[port] which i think might work because I am behind a proxy here and a similiar solution helped me clone a git repository earlier.
But when i tried this command I got the following error:
ERROR: While executing gem ... (Gem:CommandLineError)
Please Specify at least one gem name (e.g. gem build GEMNAME)
UPDATE
So I tried that gem install --http-proxy.... command again with the gem name at the end and I am back to getting the original TCP connection error above. I am pretty sure the login information I entered is correct. I also added --source http://... instead of the https one but still am having the same problem?
1st off your error is pretty telling-
ERROR: While executing gem ... (Gem:CommandLineError) Please Specify
at least one gem name (e.g. gem build GEMNAME)
2nd make sure you have met the requirements for what you're trying to do http://bundler.io/
then run the code..
gem install bundler
bundle init
echo 'gem "rspec"' >> Gemfile
bundle install
bundle exec rspec
In 2023, the best way to install bundler on an old version of Ruby is:
gem update --system
RubyGems and Bundler now ship together, so to get the latest bundler, you should just install the latest RubyGems.
would you try disable ipv6, it had been worked for me

Can not install vagrant-librarian-chef on Window?

I am install vagrant-librarian-chef in window 7, but it appear this error:
Installing the 'vagrant-librarian-chef' plugin. This can take a few minutes...
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:
An error occurred while installing chef (12.8.1), and Bundler cannot continue.
Make sure that gem install chef -v '12.8.1' succeeds before bundling.
Warning: this Gemfile contains multiple primary sources. Using source more than once without a block is a security risk, and may result in installing unexpected gems. To resolve this warning, use a block to indicate which gems should come from the secondary source. To upgrade this warning to an error, run bundle config disable_multisource true.Errno::ENOENT: No such file or directory # dir_s_mkdir - C:/Users/tuan/.vagrant.d/gems/gems/chef-12.8.1-universal-mingw32/acceptance/top-cookbooks/test_run/learn-the-basics-ubuntu/cookbooks/learn-the-basics-ubuntu/.kitchen/kitchen-vagrant/kitchen-learn-the-basics-ubuntu-learn-the-basics-ubuntu-default-ubuntu-1404
Pls help me fix that.
Thanks all!
I was having a similar issue when using the 'ohai' ruby gem. I tried running gem install chef -v '12.8.1' but received an error. I fixed my problem by adding
gem 'chef-config', '~>12.7.2'
to my gemfile.
I looked at my gem dependency tree (gem dependency) and noticed the 'ohai' gem was trying to use chef-config 12.8, so I pinned it to an earlier version.

"Could not find a valid gem in any repository" (rubygame and others)

I've been trying to install this 'rubygame' gem for some time, but whenever I use the command
gem install rubygame
it will give an error:
ERROR: Could not find a valid gem 'rubygame' (>= 0) in any repository
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
Errno::ETIMEDOUT: Connection timed out - connect(2) (http://rubygems.org/latest_specs.4.8.gz)
I've also tried other gems but with similar results:
ERROR: Could not find a valid gem 'rake' (>= 0) in any repository
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
Errno::ETIMEDOUT: Connection timed out - connect(2) (http://rubygems.org/latest_specs.4.8.gz)
I've already made sure I have an internet connection, and have already tried reinstalling both ruby and rubygems (currently using ruby 1.8, rubygems 1.7.2). Googling didn't help me at all. I would be very grateful if anyone can solve my problem. My sources list only shows http://rubygems.org
Check if you have "https://rubygems.org/" as a source to find gems at:
$ gem sources
*** CURRENT SOURCES ***
https://rubygems.org/
If not, you should be able to add it with
$ gem sources --add https://rubygems.org/
https://rubygems.org/ added to sources
Here are docs for the gem source command.
You can also add the source you want on the command whenever you have troubles using https, like this:
gem install GEMNAME --source http://rubygems.org
It's better to fix the SSL problem though.
are you behind any proxy?
check your browser for proxy that you might use:
execute the command: gem install xxx --http-proxy=http://user:password#server and you should be good to go.
You don't have an Internet connection to rubygems.org.
This happens sometimes if the site is down or blocked.
This command can show you if your connection has a way to reach rubygems.org:
traceroute rubygems.org
Maybe you should try
gem list -r
then
gem install -r rubygame
Also note that with rvmon MacosX (Lion in my case) you should install ruby-1.9.3-p194 (for Xcode 4.x compiler considerations) then
rvm rubygems current
and in my case I had to use
rvm use ruby-1.9.3-p194#global
(which contains bundler, rake, rubygems-bundlerand rvm)
and not
rvm use ruby-1.9.3-p194
(which is empty)
Can you post your versions?
ruby -v
#=> ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-linux]
gem -v
#=> 1.8.19
If your gem command is not current, you can update it like this:
gem update --system
To see if you can connect to rubygems.org using Ruby:
require 'net/http'
require 'uri'
puts Net::HTTP.get URI.parse('https://rubygems.org')
If yes, that's good.
If no, then somehow Ruby is blocked from opening a net connection. Try these and see if any of them work:
curl https://rubygems.org
curl https://rubygems.org --local-port 1080
curl https://rubygems.org --local-port 8080
env | grep -i proxy
If you're using a company machine, or within a company firewall, or running your own firewall, you may need to use a proxy.
For info on Ruby and proxies see
http://www.linux-support.com/cms/http-proxies-and-ruby/
I have fixed this issue using the proxy command option of gem install. It has the following format:
$ gem install --http-proxy http://201.187.107.19:8080 rubygame
Note, the IP address and the port number refers to a proxy. You should search for a proxy list and use one of the proxies there.
This is site with proxies: http://www.cybersyndrome.net/pla5.html
Also, I have to try 7 or 8 different proxies in order to succeed. Do not give up.
Use :
gem sources --add http://rubygems.org/
Do you want to add this insecure source? [yn] [YES]
then use
gem install sass
and done
I know this is a little late, but I was also having this issue a while ago. This is what worked for me:
REALLY_GEM_UPDATE_SYSTEM=1
sudo gem update --system
sudo gem install rails
Hope this helps anyone else having this issue :)
I have tried most of the solutions suggested here but I had no luck.
I found a solution that worked for me, which was manually updating the gemfile to 2.6.7.
The guide on how to do is in guides.rubygems.org: installing-using-update-packages
Download rubygems-update-2.6.7.gem to your C:\
Now, using your Command Prompt:
C:\>gem install --local C:\rubygems-update-2.6.7.gem
C:\>update_rubygems --no-ri --no-rdoc
After this, gem --version should report the new update version (2.6.7).
You can now safely uninstall rubygems-update gem:
C:\>gem uninstall rubygems-update -x
Removing update_rubygems
Successfully uninstalled rubygems-update-2.6.7
The reason why this did not work before was because server used certificates SHA-1, now this was updated to SHA-2.
For what it is worth I came to this page because I had the same problem. I never got anywhere except some IMAP stuff that I don't understand. Then I remembered I had uninstalled privoxy on my ubuntu (because of some weird runtime error that mentioned 127.0.0.1:8118 when I used Daniel Kehoe's Rails template, https://github.com/RailsApps/rails3-application-templates [never discovered what it was]) and I hadn't changed my terminal to the state of no system wide proxy, under network proxy.
I know this may not be on-point but if I wound up here maybe other privoxy users can benefit too.
check your DNS settings ...I was facing similar problem ... when I checked my /etc/resolve.config file ,the name server was missing ... after adding it the problem gets resolved
This worked for me to bypass the proxy definitions:
1) become root
2) gem install -u gem_name gem_name
Hope you can work it out
I tried to install a gem which is for JRuby only, running into the same error. Using jruby's command worked then:
jruby -S gem install some_jruby_gem
If you are running behind the any firewall(if firewall blocking gem installation). just try following command it works.
gem install --http-proxy http://username:pwd#server:port gem
Make sure you type the command from the "App" Directory
It is a permission issue.
try with sudo

Bundler can't find Ruby gem that appears on website

I installed Bundler on a pre-Rails 3 application and am trying to use it to install gems. My Gemfile contains the following lines:
source :rubygems
[...]
gem "RubyInline", "3.8.1"
However, when I run bundle install I get this error:
Fetching source index for http://rubygems.org/
Could not find gem 'RubyInline', required by 'memcache-client (= 1.6.3)', in any of the sources
The gem appears on the rubygems website:
http://rubygems.org/gems/RubyInline
Why is it giving me an error then?
I'm afraid this resolved itself after changes to fix other issues, and I'm not sure what the fix was. The source of several other issues was wrong permissions on various gems/binaries.
This kind of issue for me seems to be resolved on occasion by applying
bundle update
before
bundle install
The effect is to resolve old dependencies from when the bundle was originally produced and hence a gem that has been superseded (or whatever) will no longer be in the Gemfile.

Resources