{"id":432,"date":"2008-02-06T00:44:34","date_gmt":"2008-02-06T04:44:34","guid":{"rendered":"http:\/\/www.dr-chuck.com\/wordpress\/?p=432"},"modified":"2011-12-17T12:25:34","modified_gmt":"2011-12-17T16:25:34","slug":"ruby-on-rails-teaching-edition","status":"publish","type":"post","link":"https:\/\/www.dr-chuck.com\/csev-blog\/2008\/02\/ruby-on-rails-teaching-edition\/","title":{"rendered":"Ruby on Rails Teaching Edition"},"content":{"rendered":"<p>Wow &#8211; busy few days. I built three small distributions of Ruby on Rails 1.2.6 for use in my course.  There is support for Windows and Mac OS\/X 10.4.<br \/>\nThe basic idea is to come up with a distribution that works from a USB drive for students working in a lab as well as a really simple distribution that does not mess with your system configuration and it can be put anywhere in a directory structure including on a shared file server.<br \/>\nThen I built printed documentation for each of them and a podcast for each version to walk my students through the installation process.<br \/>\nThis whole thing is available at:<br \/>\n<a href=http:\/\/www.rubylearn.com\/ target=_new>www.rubylearn.com<\/a><br \/>\nHave fun.<\/p>\n<p><!--more--><br \/>\nThe tricky bit is in this setup script (I kind of nicked the idea from Instant Rails and then improved on it).  This script sets up all the necessary environment variables to point the path and Ruby runtime to wherever the script is running from.<br \/>\nThis leads to a bit clunky interface as you have to run this script every time you open a command window &#8211; but after teaching Rails for a while I have learned that students learn to love the command line interface and trying to hid the real world from them is a disservice.  Students learning command-line for the first time are a little uncomfortable &#8211; but after a few days they are command line wizards.<br \/>\nThe essence of the script is setting the parameters &#8211; here is the one that uses AFS space and sets all the paths to somewhere deep in AFS space so it is a 500 byte install if AFS is mounted already :)  But the essence of the script can be adapted to any environment.<br \/>\nThis also tells the environment variables that Ruby listens to:<br \/>\nHERE=\/afs\/umich.edu\/user\/c\/s\/csev\/Public\/html\/teachrails\/rte-mac\/<br \/>\nif [ -r $HERE\/ruby\/bin\/ruby ] ;<br \/>\nthen<br \/>\necho Setting up Ruby Environment using AFS<br \/>\nexport DYLD_LIBRARY_PATH=$HERE\/ruby\/lib\/<br \/>\nexport GEM_HOME=$HERE\/ruby\/lib\/ruby\/gems\/1.8<br \/>\nexport PATH=$HERE\/ruby\/bin\/:$HERE\/ruby\/bin\/:\/bin:\/sbin:\/usr\/bin:\/usr\/sbin<br \/>\nexport RUBYLIB=$HERE\/ruby\/lib\/ruby\/:$HERE\/ruby\/lib\/ruby\/1.8\/:$HERE\/ruby\/lib\/ruby\/site_ruby\/1.8:$HERE\/ruby\/lib\/\/ruby\/1.8\/universal-darwin8.0\/<br \/>\nexport RUBYGEMS=$HERE\/ruby\/lib\/ruby\/site_ruby\/1.8<br \/>\nruby &#8211;version<br \/>\nrails &#8211;version<br \/>\nelse<br \/>\necho<br \/>\necho &#8216;******* Error ******&#8217;<br \/>\necho Unable to find AFS space with ruby-mac installation<br \/>\necho $HERE<br \/>\nfi<br \/>\nFeel free to tell me how confused I am &#8211; some of this was guesswork &#8211; just keep adding paths to variables until it worked.   Someone wiser than me can clearly improve on this.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Wow &#8211; busy few days. I built three small distributions of Ruby on Rails 1.2.6 for use in my course. There is support for Windows and Mac OS\/X 10.4. The basic idea is to come up with a distribution that works from a USB drive for students working in a lab as well as a [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-432","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/432","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/comments?post=432"}],"version-history":[{"count":1,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/432\/revisions"}],"predecessor-version":[{"id":2535,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/432\/revisions\/2535"}],"wp:attachment":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/media?parent=432"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/categories?post=432"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/tags?post=432"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}