Changes between Initial Version and Version 1 of howto/RubyOnRails


Ignore:
Timestamp:
Sep 29, 2015, 9:52:49 AM (9 years ago)
Author:
mojca (Mojca Miklavec)
Comment:

preliminary page with instructions about installing rails

Legend:

Unmodified
Added
Removed
Modified
  • howto/RubyOnRails

    v1 v1  
     1[[PageOutline]]
     2
     3[wiki:howto <- Back to the HOWTO section]
     4
     5= About RubyOnRails = #about
     6
     7TODO
     8
     9Please note:
     10
     11MacPorts packages some outdated versions of Rails like
     12  * `rb-rails @2.3.5`
     13  * `rb19-rails @3.0.5`
     14In 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
     15{{{
     16port install rb22-rails4.2
     17}}}
     18but until then you need to use other tools with a wider base of maintainers.
     19
     20= Installation = #install
     21
     22These instructions are based on https://gorails.com/setup/osx/10.10-yosemite, but skipping the part that explains how to install another package manager.
     23
     24== Installing rbenv and ruby-build ==
     25
     26You first need to install the necessary tools:
     27{{{
     28port install rbenv ruby-build
     29}}}
     30
     31== Adding rbenv to ~/.bash_profile (optional) ==
     32
     33If you want to enable `rbenv` by default, you can add `eval "$(rbenv init -)"` to `~/.bash_profile`:
     34{{{
     35# Add rbenv to bash so that it loads every time you open a terminal
     36echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile
     37source ~/.bash_profile
     38}}}
     39
     40Please 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.
     41
     42== Installing Ruby ==
     43
     44{{{
     45rbenv install 2.2.3
     46rbenv global 2.2.3
     47ruby -v
     48}}}
     49
     50== Installing Rails ==
     51
     52{{{
     53gem install rails -v 4.2.4
     54}}}
     55
     56To make sure that `rbenv` knows about the new version of rails you additionally need:
     57
     58{{{
     59rbenv rehash
     60}}}
     61
     62=== Problems ===
     63
     64(TODO)
     65
     66There might be some problems related to installation of nokogiri.
     67
     68= Setting up the Database = #database
     69
     70TODO
     71
     72(see also [wiki:howto/MySQL MySQL HOWTO])
     73
     74[wiki:howto <- Back to the HOWTO section]