{"id":166,"date":"2010-12-19T22:14:42","date_gmt":"2010-12-20T03:14:42","guid":{"rendered":"http:\/\/wcarss.ca\/log\/?p=166"},"modified":"2010-12-20T05:12:37","modified_gmt":"2010-12-20T10:12:37","slug":"from-zero-to-rails-1","status":"publish","type":"post","link":"https:\/\/wcarss.ca\/log\/2010\/12\/from-zero-to-rails-1\/","title":{"rendered":"From Zero to Rails: Clean Maverick Meerkat install to working Rails app &#8211; Part 1"},"content":{"rendered":"<p>I haven&#8217;t done it yet &#8211; let&#8217;s see how this goes. Writing\/researching while watching Mythbusters.<\/p>\n<p>I&#8217;ve never known Ubuntu and Ruby to play nicely out of the box. Especially not when you&#8217;re trying to get rails involved. Ubuntu&#8217;s repositories are known to rubyists not to be safe, sudo isn&#8217;t a good idea to use with gem, and the maze of dependency confusion between mysql, postgresql, sqlite3, apache2, rails2\/3, and ruby1.8.6\/7 and 1.9.1\/2 is a novice&#8217;s (read: my) nightmare.. What I&#8217;ve read again and again is that I should use a tool called <a href=\"http:\/\/rvm.beginrescueend.com\/\">RVM<\/a> to install ruby; so let&#8217;s try that.<\/p>\n<p>It looks like (from <a href=\"http:\/\/rbjl.net\/19-rubybuntu-1-installing-ruby-and-rails-on-ubuntu\">various<\/a> <a href=\"http:\/\/www.dalpo.net\/2010\/11\/09\/installing-ruby-with-rvm-under-ubuntu-10-10\/\">blogs<\/a> <a href=\"http:\/\/railscasts.com\/episodes\/200-rails-3-beta-and-rvm\">and<\/a> <a href=\"http:\/\/stackoverflow.com\/questions\/4151768\/how-to-install-ruby-on-rails-3-0-on-ubuntu-10-10\">such<\/a>) the way to install RVM is by running <\/p>\n<pre>sudo apt-get install curl git-core\r\nbash &lt; &lt;( curl http:\/\/rvm.beginrescueend.com\/releases\/rvm-install-head )<\/pre>\n<p>then adding <\/p>\n<pre>[[ -s &quot;$HOME\/.rvm\/scripts\/rvm&quot; ]] &amp;&amp; source &quot;$HOME\/.rvm\/scripts\/rvm&quot;<\/pre>\n<p>to your .bashrc &#8212; right at the end is cool. It&#8217;s important to now note that you should check whether or not your .bashrc has a &#8216;return&#8217; floating around anywhere. Very likely that it does. If you find one, follow the instructions in the &#8216;Troubleshooting&#8217; section <a href=\"http:\/\/rvm.beginrescueend.com\/rvm\/install\/\">here<\/a>. I&#8217;m expecting to have to do this. After you&#8217;ve checked (and maybe fixed) that hiccup, reloading your .bashrc and install the ruby stuff:<\/p>\n<pre>source ~\/.bashrc\r\nsudo apt-get install libruby1.8 zlib1g-dev libssl-dev libreadline5-dev build-essential\r\nrvm install ruby-1.9.2\r\nrvm install ruby-1.8.7\r\nrvm use ruby-1.9.2 --default<\/pre>\n<p>lastly, we need to get rails going, so let&#8217;s do: (note that I&#8217;m not using sudo) <\/p>\n<pre>sudo apt-get install sqlite3 libsqlite3-dev\r\ngem install sqlite3-ruby\r\ngem install rails\r\ngem install mongrel<\/pre>\n<p>Heh. I&#8217;ve got all the steps written out &#8212; now let&#8217;s try it and see how things go. Culminating steps will be:<\/p>\n<pre>rails new example\r\ncd example\/\r\nbundle install\r\nrake db:create\r\nrails s<\/pre>\n<p>And check out localhost:3000 to see how she reports.<\/p>\n<p>Okay! So, that&#8217;s a skeletal plan; next up is actually doing it. That will come in post 2, which I&#8217;ve just written!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I haven&#8217;t done it yet &#8211; let&#8217;s see how this goes. Writing\/researching while watching Mythbusters. I&#8217;ve never known Ubuntu and Ruby to play nicely out of the box. Especially not when you&#8217;re trying to get rails involved. Ubuntu&#8217;s repositories are known to rubyists not to be safe, sudo isn&#8217;t a good idea to use with [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/wcarss.ca\/log\/wp-json\/wp\/v2\/posts\/166"}],"collection":[{"href":"https:\/\/wcarss.ca\/log\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wcarss.ca\/log\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wcarss.ca\/log\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wcarss.ca\/log\/wp-json\/wp\/v2\/comments?post=166"}],"version-history":[{"count":13,"href":"https:\/\/wcarss.ca\/log\/wp-json\/wp\/v2\/posts\/166\/revisions"}],"predecessor-version":[{"id":188,"href":"https:\/\/wcarss.ca\/log\/wp-json\/wp\/v2\/posts\/166\/revisions\/188"}],"wp:attachment":[{"href":"https:\/\/wcarss.ca\/log\/wp-json\/wp\/v2\/media?parent=166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wcarss.ca\/log\/wp-json\/wp\/v2\/categories?post=166"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wcarss.ca\/log\/wp-json\/wp\/v2\/tags?post=166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}