I ran railsinstaller on a new computer that I bought and afterwards, in an effort to have this computer run all my old rails projects, I copied over all the gem dependencies. However, for some reason, "bundle install --local" does not work, which is odd since this particular way of copying rails projects and gems worked just fine in the past. I ran "gem env" and got this:
C:\Users\Owner\rails_projects\depot>gem env
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.28
- RUBY VERSION: 1.9.3 (2013-11-22 patchlevel 484) [i386-mingw32]
- INSTALLATION DIRECTORY: C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe
- EXECUTABLE DIRECTORY: C:/RailsInstaller/Ruby1.9.3/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-mingw32
- GEM PATHS:
- C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1
- C:/Users/Owner/.gem/ruby/1.9.1
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
I tried being more specific and tried "gem install rake-10.2.2 --local" and I get the following error:
ERROR: Could not find a valid gem 'rake-10.2.2' (>= 0) in any repository
And finally, I see that less than half of the actual gems that are in C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems show up when running "gem list". Any help would be appreciate in figuring out how to get my gems detected. Thank you.
Related
I am desperatly trying to set up Redmine on my debian server. I managed almost everything (the interface works with webrick), but I want it to be accessable via dev.kaleydra.de, I wanted to solve this by using passenger+the apache2 module.
So now my current status is this message when I visit dev.kaleydra.de
Error message:
Redmine requires Bundler. Please install it with gem install bundler.
But bundler is definitly installed! (bundle install worked perfectly)
Some information:
gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.23
- RUBY VERSION: 1.9.3 (2012-04-20 patchlevel 194) [x86_64-linux]
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: /usr/local/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /usr/local/lib/ruby/gems/1.9.1
- /root/.gem/ruby/1.9.1
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
I tried adding this to the enviroment.rb:
ENV['GEM_HOME']='/usr/local/lib/ruby/gems/1.9.1'
ENV['GEM_PATH']='/usr/local/lib/ruby/gems/1.9.1'
What I might notice is that I can't run
passenger-install-apache2-module
because it won't let me install libpq5 (Plesk uses a newer version and it specificly requests "libpq5 (= 8.4.13-0squeeze1)" with apt-get), but since passenger is showing the page makes it look like it already works...
I am kind of desperate, any clues?
I need your apache config file.
If you have all the needed gems installed but passenger still complain no gem found, please check if your 'apache user' has the privilege to access the gem folder.
e.g. your gems is installed by root but your apache-user is non-root, then this error occurs.
the solution is quit simply, if there's a account named root (e.g. in Centos) just these lines to your apache config file (httpd.conf or so)
User root
Group root
more details about "root, apache", see this post: https://serverfault.com/questions/103644/apache-user-root-access
I am following this guide to install jekyll on OSX 10.7.3 and came up with the problem
ERROR: could not find gem jekyll locally or in a repository
I have tried:
sudo gem update --system (and get Nothing to update)
this post: How can I install Jekyll on Ubuntu 10.04 Server? , and it's no use.
I am not familiar with ruby and gem but I think this is needed:
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.6
- RUBY VERSION: 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin11.0]
- INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8
- RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
- EXECUTABLE DIRECTORY: /usr/bin
- RUBYGEMS PLATFORMS:
- ruby
- universal-darwin-11
- GEM PATHS:
- /Library/Ruby/Gems/1.8
- /Users/enzo/.gem/ruby/1.8
- /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- :sources => ["http://rubygems.org", "http://gems.github.com"]
- REMOTE SOURCES:
- http://rubygems.org
- http://gems.github.com
I don't know anything specifically about Jekyll, but there might very well be issues when running it with the system Ruby (that is, the one that comes with Mac OS).
Before wasting too much time bothering with the system Ruby (which could arguably be better left untouched), try to get either rbenv or rvm working. They allow you to install as many different versions of Ruby as you want without messing with the system Ruby, with each installation having its own gems.
Since you're not familiar with Ruby, I'll add that using rbenv or rvm is how most Ruby kids get their job done. Yes, it is an additional step that gets in the way, but it really does facilitate a smoother experience.
I recommend removing gems.github.com from your gem sources unless you really need it. GitHub ceased building gems from git repositories back in 2010. If you cannot remove it, then I recommend installing jekyll with the following command:
gem install --source http://rubygems.org jekyll
My rubygems environment for reference, as I'm on OS X 10.7.5.
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.6
- RUBY VERSION: 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin11.0]
- INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8
- RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
- EXECUTABLE DIRECTORY: /usr/bin
- RUBYGEMS PLATFORMS:
- ruby
- universal-darwin-11
- GEM PATHS:
- /Library/Ruby/Gems/1.8
- /Users/matt/.gem/ruby/1.8
- /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
I installed Jekyll directly into a new clean install of OSX Mavericks, and then wrote a quick post so I'd remember how to do it after I next reinstall my system. I've had plenty of feedback that others have had success following my guide, and no reports of anyone having any issues:
http://internet-inspired.com/wrote/install-jekyll-in-osx-mavericks/
I had Ruby 1.9.2 install, but I uninstalled it long ago. Today I installed a brand new version of Ruby 1.9.3, downloaded gem and set it up with ruby setup.rb.
I then noticed that installing gems failed, so I checked gem environment and this is what I get:
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.11
- RUBY VERSION: 1.9.3 (2011-10-30 patchlevel 0) [i386-mingw32]
- INSTALLATION DIRECTORY: c:/Ruby192/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: C:/Ruby193/bin/ruby.exe
- EXECUTABLE DIRECTORY: c:/Ruby192/lib/ruby/gems/1.9.1/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-mingw32
- GEM PATHS:
- c:/Ruby192/lib/ruby/gems/1.9.1
- C:/.gem/ruby/1.9.1
- C:/Ruby193/lib/ruby/gems/1.9.1
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
It seems messing up the new installation (Ruby193) with the old one (Ruby192).
ruby -v yields, correctly, ruby 1.9.3p0 (2011-10-30) [i386-mingw32].
How to solve the problem?
EDIT: I had GEM_HOME and RUBYLIB environment variables set up to the old directories. Updating them solved the problem.
You shouldn't need to download gem or run ruby setup.rb.
I recommend removing all references to old rubies from your path environment variable and then downloading 1.9.3 from rubyinstaller.org install it and then download, install and run the devkit
I can't install gems with bundler, it always fail with a Can't find <inser-gem-name-here> in any of the sources message although I do have rubygems defined as a source in my gemfile.
Also, I can normally install gems with gem install <gem-name>, I used to install the ones that fail manually and then run bundle install so that it sees them as already installed, but that doesn't wrok anymore.
I used to use rvm, got tired of this issue (and thought it caused it) so I switched to rbenv to no avail. I'm running 1.9.2-p290.
I'm running Mac OS Lion. Thanks!
gem env output:
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.10
- RUBY VERSION: 1.9.2 (2011-07-09 patchlevel 290) [x86_64-darwin11.2.0]
- INSTALLATION DIRECTORY: /Users/X/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: /Users/X/.rbenv/versions/1.9.2-p290/bin/ruby
- EXECUTABLE DIRECTORY: /Users/X/.rbenv/versions/1.9.2-p290/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-11
- GEM PATHS:
- /Users/X/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1
- /Users/X/.gem/ruby/1.9.1
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- :sources => ["http://gems.github.com", "http://rubygems.org", "http://gemcutter.org"]
- REMOTE SOURCES:
- http://gems.github.com
- http://rubygems.org
- http://gemcutter.org
Also
$which gem
/Users/X/.rbenv/shims/gem
And
$ which ruby
/Users/X/.rbenv/shims/ruby
I had a similar problem, that I managed to resolve by exporting my http_proxy
export http_proxy=http://user:password#host:port
Hope this helps.
When I type:
gem env
on my Windows system, it produces this info:
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.5
- RUBY VERSION: 1.8.7 (2010-01-10 patchlevel 249) [i386-mingw32]
- INSTALLATION DIRECTORY: C:/Ruby/lib/ruby/gems/1.8
- RUBY EXECUTABLE: C:/Ruby/bin/ruby.exe
- EXECUTABLE DIRECTORY: C:/Ruby/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-mingw32
- GEM PATHS:
- C:/Ruby/lib/ruby/gems/1.8
- C:/Users/pb/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://gems.rubyforge.org/
When I go to the GEM path:
C:\Ruby\lib\ruby\gems\1.8\gems
I see many gem folders with all of the installed gems. But when I type
gem list local
I get an empty listing:
*** LOCAL GEMS ***
Why are the gems not findable?
I'm not sure, but i think the command is
gem list --local
gem list local tells RubyGems to list all gems whose name starts with the string local. (See gem help list for details.) Do you have any gems with that name installed? Otherwise, it's not really surprising that the list is empty.