Ruby on Rails - Locomotive for version 2.3.8 -- is there such a thing?
I am looking for a piece of software that will allow me to use Ruby on Rails 2.3.8 on top of MACOSX - basically, I teach at a college where students are not able to get terminal acccess to the rails built into OSX so I am looking for a piece o开发者_JS百科f software like "Locomotive" that is an app that allows students to use rails without administrator access to the computer itself. Any one have any ideas?
We will be using Rails 2.3.8
thanks.
I encourage you to teach 3.0, but each to their own. If your materials only cover 2.3.8 then it's missing out on a lot of goodies associated with 3.0 (such as Bundler). Anyway:
My primary fear with this is that you're going to have an un-upgradable version of Rubygems if you don't have system privileges. Some gems require a Rubygems version >= 1.3.5 or even better, 1.3.6. Latest is 1.3.7. Thankfully, there's a way around it.
You can do this by installing the rvm gem:
gem install rvm --install-dir ~/.gems
RVM is "Ruby Version Manager" and does what it says on the tin: manages different versions of Ruby on your system. It'd be helpful in your case because it works without modifying the system Ruby.
This will install the gem to the user's home directory rather than the default system path. Then you'll need to run the rvm-install
command which, as of this writing is:
~/.gems/rvm-1.0.14/bin/rvm-install
Your version of RVM may be different. To install a new version of Ruby which people can (ab)use run:
rvm install ruby-1.9.2-p0
1.9.2 is the latest stable version of Ruby and I highly encourage you use it rather than the older 1.8.7.
This should come with the latest Rubygems and, for bonus points, won't muddle about with the existing ruby installation on the machine (which is probably impossible if you don't have admin rights).
From this point, you'll be able to use
rvm use ruby-1.9.2-p0
to "switch" to that specific ruby. From there, you'll be able to do run gem install rails -v 2.3.8
which will install Rails somewhere in ~/.rvm
. The location is not important. What is important however is that now you'll have a rails
command that you can use and then you can go from there.
Good luck!
精彩评论