ruby gem install issue - ERROR: Could not find a valid gem 'vim-ruby' (>= 0) in any repository - ruby

I typed following command in prompt:
# gem install vim-ruby --remote
then got a error message:
ERROR: Could not find a valid gem 'vim-ruby' (>= 0) in any repository
My environment is windows xp and ruby's version is 1.9.3
how to solve it?

vim-ruby is not a gem. Checking the gem repository using gem list vim -r returns several gems, but not that one.
From the docs:
How you get these files into Vim:
[...]
By downloading one of the tarballs, you can easily install the latest
stable or development version wherever you like on your machine. No
README, no vim-ruby-install.rb, just Vim files. You would typically
install these into either $VIM/vimfiles, for system-wide use, or $HOME/.vim
($HOME/vimfiles on Windows) for personal use.
Remember that when you install Vim in the first place, all of these files
are present. The purpose of downloading and installing them from
github is to get the latest version of them.

vim-ruby is not a gem but the page: https://github.com/vim-ruby/vim-ruby has a link https://github.com/vim-ruby/vim-ruby/wiki in which the link "VimRubySupport" has a section "Installing the latest version" which shows the vim-ruby as a gem. I too had the same problem as the original post. I downloaded the archive file from http://rubyforge.org/projects/vim-ruby/ which has a .rb file (bin/vim-ruby-install.rb after untarring the archive in my case) which installs the required vim files.

This method should solve your issue:
$ gem install --http-proxy http://201.187.107.19:8080 vim-ruby
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 sample site with proxies: http://www.cybersyndrome.net/pla5.html

Related

Can Ruby's Sass gem be manually installed?

I work inside a corporate firewall. I am using Windows 10 and have the Ruby 2.4 x64 install.
I need to get the sass gem. I cannot do it through the command line because all external calls such as this are blocked and will not be unblocked for my situation. Is there a place I can manually download the sass gem, and then issue the command to install the gem from a local file?
I'm in the same position and use two techniques
through the firewall
See my answer at installing-gems-from-behind-a-corporate-firewall
from a local file
You download the gem from https://rubygems.org/downloads/sass-3.5.4.gem
You can put the file in your ruby\bin folder and delete it later.
Then you cd to your bin folder and install it in the console with the command
gem install sass-3.5.4.gem --local
the 3.5.4 is the current version.
If there are dependencies (other gems) you need to first download them as wel.
Can't see what these are because on this machine I'm still using Ruby MRI 1.9.3 and the current version of sass requires Ruby 2.0.0
See also my answer here
deploy-a-ruby-gem-local-without-using-git-or-internet-access

Error when using overcommit and Github Desktop

I am using overcommit gem (https://github.com/brigade/overcommit) in my project, when I use Github Desktop for osx I get these errors:
This repository contains hooks installed by Overcommit, but the
overcommit gem is not installed. Install it with gem install
overcommit. (1)
The gem is installed, it works in terminal. I guess it's because I use rvm and Github Desktop doesn't know about rvm. Anybody knows how to fix this?
Ok finally got it to work!
Combined the answer from #michelegera with comment from #rewritten
Step 1:
sudo su -
gem install bundler
gem install overcommit
gem install rubocop
Step 2: added command: ['bundle', 'exec', 'rubocop'] to .overcommit.yml
Thanks for the help!
Most likely it's this line where the error occurs. As you can see the main issue is that it's not able to require 'overcommit'. I don't know the GitHub desktop client so well (maybe there is a way to configure it inside of it), but one thing you could do is adding the absolute path where rvm stores your gems to the "require path" in the hook file. This could look like:
$: << "/home/user/.rvm/path/to/gems/dir"
The disadvantage of this is that you would have your absolute path in the hook file and it most likely won't work for others. You might also want to consider installing the gem globally for the the ruby interpreter that executes the script (see Shebang line in the hook file).
You are right, Github Desktop (or any other GUI) isn’t running in your terminal environment, so it knows nothing about your specific RVM installation.
A simple solution is to install overcommit and any other gems required by your hooks into your system Ruby:
sudo su -
gem install bundler
gem install overcommit
gem install rubocop
...
If you installed Git via Homebrew or other means, you might have to change the Git binary used by your GUI.
For example, in Tower, I selected Homebrew’s version rather than the System’s.

How to install Compass on Windows

I have installed Ruby on my system, and now I want to install Compass. But when I execute the gem install compass command, it shows an error like this:
could not find valid gem 'compass' <>=0> in any repositary
And also:
SocketError: getadressinfo: no such host is known.<http://rubygems.org/latest_specs.4.8.gz>
I don't know what the problem is. If I run ruby -v, it shows the Ruby version. So what's the problem with installing Compass?
Can anyone explain this to me properly? I've searched Google, but all I could find was some proxy problem - and I couldn't understand how to set the proxy at all.
I'm using Windows and a company internet connection, so I don't know the username and password of my proxy.
I was behind a proxy and HumberFrench's solution above helped:
Go to Ruby bin folder:
cd c:/Ruby193/bin
And then install compass gem:
gem install compass --http-proxy http://<proxy_adreess>:<port_of_proxy>
Another tip: am on Aptana Studio, so this could be run from within Aptana's terminal.
Cant up-vote so adding this here.
I had the same problem, finally solved it manually.
Goto the rubygems compass page, and download the gem by clicking the Download link. Scroll down and you will see three Runtime Dependencies. Goto each of them and download those gems also. Put all of them in a directory, and try
gem install downloaded_compass_filename
This should solve your problem.
If it gives an repository not found error message, you can force gem to try local files through the gem --local install option
if you use a proxy, and get error, do it
gem install compass --http-proxy http://<proxy_adreess>:<port_of_proxy>
gem install -h gives you a lor of options
The proxy is the most likely cause. You will have to get permission from the network admin, or manually download compass. For more info, See this SA post.
If you decide to go the manual route here is a link to the RubyGems compass page. This not ideal, but also better than having to write css without compass magic ^^
Good luck!
On windows i had a few instalations of ruby:
C:\ruby187
and
C:\Ruby200-x64
install compass in both places, using:
gem install compass
Try running the install command in the bin folder.
$ cd C:\Your_Ruby_Folder\bin
$ gem install compass
I have same problem and i resolve it with.
Uninstall ruby end deleted folder ruby
Download ruby version 1.9.x
After thet install sass
last stem: install compass

ERROR: While executing gem ... (Zlib::GzipFile::Error) not in gzip format

I am developing a Sencha touch 2 application. I have been following the "Styling the user interface of a Sencha Touch application" tutorial on theming of secha touch applications.
It requires me to install Ruby, Compass and SASS.
I installed Ruby using the installer from rubyinstaller.org.
On executing the following command, I get the expected result which confirms correct installation:
C:\>ruby -v
ruby 1.9.3p327 (2012-11-10) [i386-mingw32]
Current source is up to date:
C:\>gem sources
** CURRENT SOURCES **
http://rubygems.org/
Next, since I am behind a proxy, I used the following command to install HAML/Compass:
C:\>gem install -p [proxy:port] compass
ERROR: While executing gem ... (Zlib::GzipFile::Error)
not in gzip format**
Can someone help me? I found solutions such as system update, gem sources update, but everything is up to date on my system.
Edit:
C:\>gem install compass
works perfectly fine on my private system. When I try the same command from my workplace I need to use the proxy as mentioned above and that results in an error.
I assume the ERROR occurs since the web sense at my workplace blocks these downloads.
Solution: I downloaded the required gems: chunky_png, fssm, compass, sass, haml etc.. directly from http://rubygems.org/gems and placed these gems in my local directory.
After this I tried gem install compass. This first searches your local directory. On finding the required gems, installation takes place. Does not require connection to the ruby website.
Note: Run the command from the path where the gems are located
eg: I have placed the gems in C:\Ruby193\lib\ruby\gems\1.9.1\gems
So I run the following command :
C:\Ruby193\lib\ruby\gems\1.9.1\gems>gem install compass
I had a similar problem, it worked on my own private laptop, but failed while using a virtual server at work (running Ubuntu 12.10) that used a proxy.
Following the suggestion I found here, from the command line I defined:
export HTTPS_PROXY=proxy-address:proxy-port-number
export HTTP_PROXY=proxy-address:proxy-port-number
and then my gem install package worked fine.

Could not find gem 'rubytree (~> 0.5.2) ruby' while installing ChiliProject on Debian

I am trying to install chiliproject on a server, following the -well done- documentation I am hitting this error
Could not find gem 'rubytree (~> 0.5.2) ruby' in any of the gem sources listed in your Gemfile.
I did a gem install rubytree
I get this message
========================================================================
Thank you for installing rubytree.
WARNING: SIGNIFICANT API CHANGE in 0.8.0 !
------------------------------------------
Please note that as of 0.8.0 the CamelCase method names are DEPRECATED.
The new method names follow the ruby_convention (separated by '_').
The old CamelCase methods still work (a warning will be displayed),
but may go away in the future.
Details of the API changes are documented in the API-CHANGES file.
========================================================================
Successfully installed rubytree-0.8.1
1 gem installed
Installing ri documentation for rubytree-0.8.1...
file 'COPYING,API-CHANGES' not found
Installing RDoc documentation for rubytree-0.8.1...
file 'COPYING,API-CHANGES' not found
That is saying the installation was succesful. So why do I get the error ?
If the error is from the API change how can I request version 0.5.2 of the rubytree gem ?
When I do a gem list --local | grep 'rubytree'
I have this output rubytree (0.8.1)
So why is the system saying could not find gem 'rubytree' ?
thank you for any help,
Depending on what version of rails you are using (and it sounds like you are using a relatively newer one, if it's prompting you for your Gemfile), then you need to use Bundler to manage your gems.
Try editing your Gemfile, adding a new line that reads:
gem "rubytree", "< 0.6"
Then open up a console, and type this command
bundle install
This should fix your problems, but if you still get errors when running a command, then try typing bundle exec prior to the command (i.e. rails server becomes bundle exec rails server).
Currently, we require rubytree exactly in version 0.5.2 or 0.5.3, as specified in our Gemfile, the 0.8.1. version you installed by hand will not suffice that requirement, which is exactly what the error message states.
What seems a bit odd is the literal ruby in the error message. Could you please make sure that you have the exact unchanged Gemfile from the source on your system? Also, could you please remove any user-installed plugins and try again? Also, which ruby (type and version) on which operating system are you using?

Resources