While trying to install Rails 3, I get the following error:
command run: sudo gem install rails --pre
error'd now with:
Successfully installed rails-3.0.0.rc2
1 gem installed
Installing ri documentation for rails-3.0.0.rc2...
File not found: lib
Or if you don't want to worry about running versions side by side you can do
gem update rails
At least it worked for me.
Rails 3 is out of beta/rc now, so try:
gem install rails --version 3.0.0
It should work on Ruby 1.8.7 and 1.9.2-p0.
I haven't personally seen that issue, but you could try and get around it by using the --no-ri option.
sudo gem install rails --pre --no-ri
There's also a --no-rdoc option if you have trouble with that too.
Related
OSX Mavericks, trying to upgrade from Rails 4.0.4 to either 4.1.0.beta1 or 4.1.0.rc2 with ruby version ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin12.0].
In both instances (beta1 and rc1 builds), Terminal gets stuck at Installing ri documentation for rails-4.1.0.rc2
and I have to quit the process (command + > ).
Any suggestions?
This has happened to me a few times. I believe it is a known issue which has never been resolved properly.
Simply install the gem without the documentation, if you don't mind, like the other answer suggests.
gem install rails --no-ri --no-rdoc
UPDATE (2020-04-29)
The new way of generating no documentation is adding the --no-document (in short -N) option, like so:
gem install rails --no-document # or -N in short
Are you sure it's stuck? The documentation takes ages to install (upwards of 4 mins even on a high end MBPr). You could also install the rails gem without documentation using:
gem install --no-ri --no-rdoc rails
Hi i'm new to ruby on rails
I have 3 ruby version in my computer.
In a project i had to use rails 3.2.1 and ruby 1.9.2
So I switched using rvm use 1.9.2 in terminal. But after that my rails commands are not detected.
$ rails g model abc
The program 'rails' is currently not installed. You can install it by typing:
sudo apt-get install rails
Why is this happening? And how to solve this?
You may need to differentiate your gem set that contains that specific version of rails from the old ones.
rvm use 1.9.2#new_gem_set_of_yours --create --default
And then retry installing the 3.2.1 rails
gem install rails --version 3.2.1
Or specify the new rails version in your Gemfile and let Bundler take care of it
gem 'rails', '3.2.1'
and run bundle install.
Type in your terminal
gem install rails -v 3.2.1
if it does not work, first try
rvm install 1.9.3
then
rvm rubygems current
and repeat.
I have worked with rails before and i thought that i would try out spree to learn more about engines. Following the getting started tutorial on sprees documentation it seemed very strait forward. I installed the gem gem install spree_cmd and then added gem 'spree' to the gemfile and ran bundler which ran fine. It installed several spree gems. But on the instruction to run spree install --auto-accept it returns
$ spree install --auto-accept
-bash: spree: command not found
I am running on mac OS X 10.8.4. ruby 1.9.3p327 rails 2.3.13 and rbenv and my ruby manager
any thing i am missing?
You should try to Add gem 'spree' to the Gemfile and after that
$ bundle install
and then $ spree install --auto-accept
I got this problem too! And I tried to search for a solution. Well, spree require an exact version of ruby and rails. So I think you need to install a correct ruby version. Try run :
$rbenv install 2.0.0-p247
This makes the spree command works for me
I got this error:
Could not find gem 'mysql2 (>= 0, runtime)' in any of the gem sources.
Try running `bundle install`.
when trying:
rails script/generate scaffold post title:string
I am on a mac osx, rails 1.8.7, 3.0
On ubuntu you may need to install library for mysql first.
sudo apt-get install libmysqlclient-dev
And then you can install
gem install mysql2
or even better way is to use rvm
rvm gem install mysql2
You use rails script/generate … with rails 3.0? Maybe you upgraded rails 2.x project? With rails 3 you should use rails generate … or shorter rails g ….
About missing gem: run bundle install as asked for :)
If you use the Mac, this will help you (I also had been on this error for 2 hours).
brew install mysql
brew install openssl
gem install mysql2 -v '0.5.2' -- --with-ldflags=-L/usr/local/opt/openssl/lib --with-cppflags=-I/usr/local/opt/openssl/include
bundle install
The main point is that you have to first install the openssl for setup the mysql2 gem on Mac.
I have an older Ubuntu server with a Rails app running on version 2.3.5 that I'd like to move to version 2.3.8. The server doesn't seem to know that there is an update available, no matter how many times I run a "gem update" or "gem update --system" or "update_rubygems"
root#server:~# gem install rails -v 2.3.8
ERROR: could not find gem rails locally or in a repository
root#server:~# gem install rails
Successfully installed rails-2.3.5
1 gem installed
Installing ri documentation for rails-2.3.5...
Installing RDoc documentation for rails-2.3.5...
RubyGems 1.3.5 is installed.
I don't remember having to do anything special for any of my other servers when making this upgrade.
Any ideas?
Try:
gem install rails --source http://rubygems.org
with --source and without -v.