I would like to read Rails documentation locally though gem server.
I go to http://localhost:8808/ and Rails 2.3.3 gem is in the list of the gems installed, but when I click [rdoc] I get:
`/doc_root/rails-2.3.3/rdoc/index.html' not found.
I tried to uninstall and reinstall Rails but I got no effect.
All other gems work properly, why I can't see Rails documentation?
Rails itself has no documentation while you can read rdocs about actionmailer, actionpack, activerecord, activeresource or activesupport.
You can try to explicitly generate ri and rdoc during gem installation. The command is as follows:
$ sudo gem install rails --rdoc --ri
Cheers
http://railsapi.com/
Just download this to your gem docs dir.
Related
Parsing documentation for bundler-1.3.2
Installing ri documentation for bundler-1.3.2
Parsing documentation for rails-3.2.12
Installing ri documentation for rails-3.2.12
Done installing documentation for i18n, multi_json, activesupport, builder, activemodel, rack, rack-cache, rack-test, journey, hike, tilt, sprockets, erubis, actionpack, arel, tzinfo, activerecord, activeresource, mime-types, polyglot, treetop, mail, actionmailer, rack-ssl, thor, rdoc, railties, bundler, rails (58 sec).
29 gems installed
204-252:~ narendra$ rails -v
Rails 2.3.8
204-252:~ narendra$ gem update rails
Updating installed gems**strong text**
Nothing to update
If you're using rbenv you can try running rbenv rehash after updating rails.
If you're in a rails project folder that was built with Rails 2.3.8 then when you run rails -v in that folder it will return that version of rails instead of the latest one. So you could try moving to another folder and see if running rails -v gives you the version you're expecting.
Also, if you installed rails with sudo gem install rails sometimes /usr/bin/rails still points to the old version, so you could update that to point to the new one.
Since rails 3.2.12 is not included in the output of gem list, I suspect you installed the gem with sudo. Installing with sudo and then trying to list the gems without it (or other operations) can give you a different list. Try doing sudo gem list, and if rails 3.2.12 is in there, thats your problem. Try installing it without sudo.
I am completely new to Ruby and need to use Ruby on Rails 2.3.5 on Windows. I have downloaded the zip from GitHub here: https://github.com/rails/rails/tree/v2.3.5
There was no gem file so I tried rake in the extracted directory. It took ages and seemed to have a lot of errors, but it did eventually complete.
There was no gem file created (is this even what rake is supposed to do?). And rails is not installed (typing rails at the command prompt doesnt work).
Any ideas what I am doing wrong?
EDIT: I cannot use gem install rails -v "2.3.5" as I am behind a firewall. I think I need to install it from local files.
You first need to download and install Ruby 1.8.7.
You can then install Rails via gem install rails -v=2.3.5
I would recommended you download the gems of Rails 2.3.5 from: http://rubygems.org/gems/rails/versions/2.3.5
You also need other dependencies, such as:
actionmailer = 2.3.5
actionpack = 2.3.5
activerecord = 2.3.5
activeresource = 2.3.5
activesupport = 2.3.5
rake >= 0.8.3
Since you do not have an direct internet connection, you need to download them by hand.
After you download them, use "gem install xxx.gem" to install
install ruby, include gems support.
at the command line
gem install rails
Do not install instant rails, as it is outdated and unmaintained. Use RailsInstaller http://railsinstaller.org/
You normally install Rails by only using gem, you only install "by hand" if it is not hosted anywhere.
Do the following steps (I suppose that ruby is installed and the gem command is working):
gem install rails -v 2.3.5
This should include all needed gems as well, and will install the rails command in your shell. However, to use it in Windows is a little bit difficult, because the installation of sqlite3 is not so easy.
If you could access outside world through a corporate proxy, you could use it's address in gem command, like this: gem install rails -v 2.3.5 -p http://corporate_proxy
Install InstantRails: http://broadcast.oreilly.com/2008/12/installing-instant-rails-on-wi.html
I am getting error installing Rails_admin with rails 3.0.3. Command line log shown below -
C:\rorprj\app>gem uninstall rails_admin
Successfully uninstalled rails_admin-0.0.0
C:\rorprj\app>gem install rails_admin
Temporarily enhancing PATH to include DevKit...
Successfully installed rails_admin-0.0.0 1 gem installed
Installing ri documentation for rails_admin-0.0.0...
Installing RDoc documentation for rails_admin-0.0.0...
C:\rorprj\app>rails generate rails_admin:install_admin
**Could not find generator rails_admin:install_admin.**
C:\rorprj\app>rails -v
Rails 3.0.3
Anything I can do fix this?
Try this
gem 'rails_admin', :git => 'git://github.com/sferik/rails_admin.git'
Sometimes the actual github repo has an different version. I have it running on 3.0.3 and that is what is in my gemfile.
If you call
rails generate rails_admin
the 'help' returns
*Hello, to install rails_admin into your app you need to ru*n:
rake rails_admin:install
And this works. I just encountered the same problem as you. (Keep in mind that you need to add the gem to the gemfile too)
Did you add this gem to your Gemfile? This file is responsible for loading all gems that your application depends on, and if this gem isn't specified in it then it will not be loaded.
When I gem server and go to the page, I notice there wasn't a link to the RDoc, and when I move to there a pop out says RDoc is not installed.
But when I type rdoc --help in terminal, there is a reply. How to get to the rdoc, because I need to read omniauth rdoc?
I just tried using Rails 3.0.1 and Ruby 1.9.2 on a Mac and it worked... no rdocs content for omniauth itself but there are docs for oa-basic, oa-core, oa-enterprise, oa-oauth, oa-openid
You can consider uninstalling omni-auth and reinstalling it
gem uninstall omniauth
gem install omniauth
and see if the rdoc get built. Also, if you use RVM on Mac or Linux, you can create a new gemset and then install omniauth again and try.
Solve it by using sudo gem rdoc omniauth ... but nothing inside
I use gem install rails -v=2.3.8 to install rails, and it says rdoc and ri has been generated.
But when I gem server, I can't open the rails doc in browser, it says doc_root/rails-2.3.8/rdoc/index.html not found
I looked into /usr/local/lib/ruby/gems/1.8/doc/rails-2.3.8/rdoc, found it is empty.
How to fix it? How to generate the rdoc by gem?
Maybe re-generating might help: sudo gem rdoc --all
Can you try this DIR "/usr/lib/ruby/gems/1.8/doc/rails-2.3.5/"