[MacPorts] howto/RubyOnRails added

MacPorts noreply at macports.org
Tue Sep 29 02:52:52 PDT 2015


Page "howto/RubyOnRails" was added by mojca at macports.org
Comment: preliminary page with instructions about installing rails
Content:
-------8<------8<------8<------8<------8<------8<------8<------8<--------
[[PageOutline]]

[wiki:howto <- Back to the HOWTO section]

= About RubyOnRails = #about

TODO

Please note: 

MacPorts packages some outdated versions of Rails like
  * `rb-rails @2.3.5`
  * `rb19-rails @3.0.5`
In ideal world the packaging of these modules would be better and more up-to-date, so that installing Ruby on Rails would be as straightforward as
{{{
port install rb22-rails4.2
}}}
but until then you need to use other tools with a wider base of maintainers.

= Installation = #install

These instructions are based on https://gorails.com/setup/osx/10.10-yosemite, but skipping the part that explains how to install another package manager.

== Installing rbenv and ruby-build ==

You first need to install the necessary tools:
{{{
port install rbenv ruby-build
}}}

== Adding rbenv to ~/.bash_profile (optional) ==

If you want to enable `rbenv` by default, you can add `eval "$(rbenv init -)"` to `~/.bash_profile`:
{{{
# Add rbenv to bash so that it loads every time you open a terminal
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile
source ~/.bash_profile
}}}

Please note that this will hide the ruby as installed by MacPorts using `port select ruby ...`. If you want to switch back to that version of ruby, you should comment out that line in `~/.bash_profile` again.

== Installing Ruby ==

{{{
rbenv install 2.2.3
rbenv global 2.2.3
ruby -v
}}}

== Installing Rails ==

{{{
gem install rails -v 4.2.4
}}}

To make sure that `rbenv` knows about the new version of rails you additionally need:

{{{
rbenv rehash
}}}

=== Problems ===

(TODO)

There might be some problems related to installation of nokogiri.

= Setting up the Database = #database

TODO

(see also [wiki:howto/MySQL MySQL HOWTO])

[wiki:howto <- Back to the HOWTO section]

-------8<------8<------8<------8<------8<------8<------8<------8<--------

--
Page URL: <https://trac.macports.org/wiki/howto/RubyOnRails>
MacPorts <https://www.macports.org/>
Ports system for OS X

This is an automated message. Someone added your email address to be
notified of changes on 'howto/RubyOnRails' page.
If it was not you, please report to .


More information about the macports-changes mailing list