{"id":7019,"date":"2014-05-17T00:21:04","date_gmt":"2014-05-17T00:21:04","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/05\/17\/problems-with-macports-ruby19-install-collection-of-common-programming-errors\/"},"modified":"2014-05-17T00:21:04","modified_gmt":"2014-05-17T00:21:04","slug":"problems-with-macports-ruby19-install-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/05\/17\/problems-with-macports-ruby19-install-collection-of-common-programming-errors\/","title":{"rendered":"Problems with Macports Ruby19 Install-Collection of common programming errors"},"content":{"rendered":"<p>It turns out I already had a macports install of ruby (1.8.7).<\/p>\n<p>I uninstalled all my macports ruby19 editions <code>sudo port uninstall ...<\/code><\/p>\n<p>deactivated the active version <code>sudo port -f deactivate ruby<\/code><\/p>\n<p>and installed the version of 1.9.3 with no suffix<\/p>\n<p><code>sudo port install ruby19 +nosuffix<\/code><\/p>\n<p>I received this error:<\/p>\n<p><code>Image error: \/opt\/local\/bin\/gem is being used by the active rb-rubygems port. Please deactivate this port first, or use 'port -f activate ruby19' to force the activation.<\/code><\/p>\n<p>so ran <code>sudo port -f activate ruby19<\/code><\/p>\n<p>now when I run <code>rails server<\/code> I get:<\/p>\n<pre><code>\/opt\/local\/lib\/ruby1.9\/1.9.1\/rubygems\/dependency.rb:247:in `to_specs': Could not find railties (&gt;= 0) amongst [bigdecimal-1.1.0, io-console-0.3, json-1.5.4, minitest-2.5.1, rake-0.9.2.2, rdoc-3.9.4] (Gem::LoadError)\nfrom \/opt\/local\/lib\/ruby1.9\/1.9.1\/rubygems\/dependency.rb:256:in `to_spec'\nfrom \/opt\/local\/lib\/ruby1.9\/1.9.1\/rubygems.rb:1231:in `gem'\nfrom \/opt\/local\/bin\/rails:22:in `'\n<\/code><\/pre>\n<p>I then updated my gem package and rails:<\/p>\n<pre><code>sudo gem update --system\nsudo gem uninstall rubygems-update\nsudo gem install rails\nsudo bundle install\n<\/code><\/pre>\n<p>result:<\/p>\n<pre><code>Your bundle is complete! Use 'bundle show [gemname]' to see where a bundled gem is installed.\nPost-install message from rdoc:\nDepending on your version of ruby, you may need to install ruby rdoc\/ri data:\n\n= 1.9.2 : nothing to do! Yay!\n<\/code><\/pre>\n<p>A useful discussion here on macports and ruby paths: How does MacPorts install packages? How can I activate a Ruby installation done via MacPorts?<\/p>\n<p>Many people recommend RVM https:\/\/rvm.io\/, but for me I just need 1.9.2 running for now.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It turns out I already had a macports install of ruby (1.8.7). I uninstalled all my macports ruby19 editions sudo port uninstall &#8230; deactivated the active version sudo port -f deactivate ruby and installed the version of 1.9.3 with no suffix sudo port install ruby19 +nosuffix I received this error: Image error: \/opt\/local\/bin\/gem is being [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7019","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7019","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=7019"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7019\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=7019"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=7019"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=7019"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}