{"id":705,"date":"2012-02-04T00:41:56","date_gmt":"2012-02-04T07:41:56","guid":{"rendered":"http:\/\/jim-zimmerman.com\/?p=705"},"modified":"2012-02-20T22:35:02","modified_gmt":"2012-02-21T05:35:02","slug":"ruby-on-rails-centos-5-65-7","status":"publish","type":"post","link":"https:\/\/jim-zimmerman.com\/?p=705","title":{"rendered":"Ruby on Rails &#8211; CentOS 5.6\/5.7"},"content":{"rendered":"<p>This one presented quite a challenge for me.  It seems that the magical solution is using the right versions.  There are a number of ways (supposedly) to install ruby on rails.  I started out trying to use ruby packages included in CentOS.  I quickly realized that was not going to work.  It kept running all kinds of issues with libraries missing or incorrect versions.  So then, I opted to just build from source.  Well, this got me much closer but I ended up having an openssl issue that I thought I resolved, but the gem command was having all kinds of issues.  Something clearly was not right.  So, I then went back to using RVM, which I had tried earlier.  This time I started completely over with a new HPCloud CentOS 5.6 image.  The following is what worked for me.<\/p>\n<p>As I mentioned above, I started with a clean HPCloud CEntOS 5.6 image ( ami-000004d2 &#8211; local (CentOS 5.6 Server 64-bit) ).<\/p>\n<p># yum groupinstall &#8220;Development Libraries&#8221; &#8220;Development Tools&#8221; <\/p>\n<p>The next step, of course, turned my 5.6 instance into a 5.7 instance:<br \/>\n# yum update<br \/>\n# shutdown -r now<\/p>\n<p>Add the EPEL repository:<\/p>\n<p># cd \/usr\/local\/src<br \/>\n# wget http:\/\/download.fedora.redhat.com\/pub\/epel\/5\/i386\/epel-release-5-4.noarch.rpm<br \/>\n# rpm -ivh epel-release-5-4.noarch.rpm<br \/>\n# yum install git<\/p>\n<p>Remove certificate requirement for curl, when installing rvm:<br \/>\n# echo insecure >> ~\/.curlrc<\/p>\n<p># bash -s stable < <(curl -s https:\/\/raw.github.com\/wayneeseguin\/rvm\/master\/binscripts\/rvm-installer)\n\n# vigr\n...\nrvm:x:500:root\n\nUpdate environment variables:\n# source \/etc\/profile.d\/rvm.sh\n\nInstall other dependencies for ruby determined by running <em>rvm requirements<\/em>:<br \/>\n# yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison iconv-devel<\/p>\n<p># rvm install 1.9.2<br \/>\n# rvm use 1.9.2<\/p>\n<p>Note: You can use the following command to make this version the system default:<br \/>\n# rvm use 1.9.2 &#8211;default<\/p>\n<p>To verify that all is right at this point:<br \/>\n# type rvm | head -1<br \/>\n<em>rvm is a function<\/em> is the expected output.<\/p>\n<p># cd $(rvm gemdir)<\/p>\n<p>The following will install the gem command:<br \/>\n# rvm rubygems current<\/p>\n<p>This will allow you to install rails:<br \/>\n# gem install rails<\/p>\n<p>This has allowed me (rails is not needed for this) to install hpcloud command to manage my Storage Object.<\/p>\n<p># wget http:\/\/build.hpcloud.com\/sites\/default\/files\/downloads\/hpfog.tar<br \/>\n# tar -xvf hpfog.tar<br \/>\n# wget http:\/\/build.hpcloud.com\/sites\/default\/files\/downloads\/hpcloud.tar<br \/>\n# tar -xvf hpcloud.tar<br \/>\n# gem install hpfog-x.x.x.gem<br \/>\n# gem install hpcloud-x.x.x.gem<\/p>\n<p># hpcloud<br \/>\nTasks:<br \/>\n  hpcloud account:setup                # set up or modify your credentials<br \/>\n  hpcloud acl <object\/container>       # view the ACL for an object or container<br \/>\n  hpcloud acl:set <resource> <acl>     # set a given resource to a canned ACL<br \/>\n  hpcloud containers                   # list available containers<br \/>\n  hpcloud containers:add <name>        # add a container<br \/>\n  hpcloud containers:remove <name>     # remove a container<br \/>\n  hpcloud copy <resource> <resource>   # copy files from one resource to another<br \/>\n  hpcloud get <object>                 # fetch an object to your local directory<br \/>\n  hpcloud help [TASK]                  # Describe available tasks or one specific task<br \/>\n  hpcloud info                         # info about the HP Cloud CLI<br \/>\n  hpcloud list <container>             # list container contents<br \/>\n  hpcloud location <object\/container>  # display the URI for a given resource<br \/>\n  hpcloud move <object> <object>       # move objects inside or between containers<br \/>\n  hpcloud remove <object\/container>    # remove an object or container<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This one presented quite a challenge for me. It seems that the magical solution is using the right versions. There are a number of ways (supposedly) to install ruby on rails. I started out trying to use ruby packages included in CentOS. I quickly realized that was not going to work. It kept running all [&#038;hellip<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[40,257,256,255],"class_list":["post-705","post","type-post","status-publish","format-standard","hentry","category-documentation","tag-centos","tag-hpcloud","tag-rails","tag-ruby"],"share_on_mastodon":{"url":"","error":""},"_links":{"self":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/705","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=705"}],"version-history":[{"count":5,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/705\/revisions"}],"predecessor-version":[{"id":719,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/705\/revisions\/719"}],"wp:attachment":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=705"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=705"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=705"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}