This is the most flexible configuration I'm aware of for doing Ruby on Rails development. The goal is to have any version of `ruby` at your finger tips, so that any version of `rails` can be utilized. This allows you to work on older projects as easily as newer ones. The key to doing this is using `rvm` (Ruby Version Manager). Another advantage to using `rvm` is that once everything is installed, you won't have to use `sudo` to install gems or do regular development. I recommend MacPorts instead of Homebrew. --- #### Step 1 - Install MacPorts Install MacPorts from the package on the site: https://www.macports.org/ Once MacPorts is installed, do a self update: ```bash $ sudo port selfupdate ``` This will prompt you to install `xcodebuild`. ![](https://cl.ly/1L0R0C0v2J16/Screen%20Shot%202017-04-21%20at%202.51.47%20PM.png) Once it's installed, make sure everything is up to date: ```bash $ sudo port upgrade outdated ``` --- #### Step 2 - Install Ruby Version Manager Before installing `rvm`, we need to install `gpg`. ```bash $ sudo port install gnupg gnupg2 ``` Next, install `rvm` from the steps on the site: https://rvm.io/ --- #### Step 3 - Installing Ruby Close your terminal window and relaunch the terminal to load the new path. Now, we can install a more modern version of `ruby`. ```bash $ rvm install ruby-2.2.5 ``` --- #### Step 4 - Installing Rails Now that we have a new `ruby` version, we can install `rails`. ```bash $ gem install rails ``` Note, this version of `rails` will be associated with this version of `ruby`. If you switch to another version of `ruby`, you'll have to install `rails` again. --- #### Step 5 - Starting a Rails Project ```bash $ rails new hello_world $ cd hello_world $ rails s ``` The server will start and we can take a look by opening the browser: http://localhost:3000/ ![](https://cl.ly/3q1u3O3M2I0X/Screen%20Shot%202017-04-21%20at%202.31.55%20PM.png) To close the server, press `^C` in the terminal. --- #### Step 6 - Anvil If you're working on a bunch of projects, it's nice to be able to run them as needed without having to launch `rails s`. This tool will make it easy: https://anvilformac.com After installation, click on the anvil icon at the top of the screen and let it install `pow`. ![](https://cl.ly/45180k0t051f/Screen%20Shot%202017-04-21%20at%202.36.25%20PM.png) Once `pow` is installed, next we can add our `hello_world` app example. ![](https://cl.ly/1r0h191t0S2B/Screen%20Shot%202017-04-21%20at%202.39.06%20PM.png) ![](https://cl.ly/3z2o1A2T282E/Screen%20Shot%202017-04-21%20at%202.40.28%20PM.png) Now, point your browser to the app: http://hello_world.dev --- #### Optional One of the best text editors out there is Atom, it works great with Rails projects: https://atom.io/ --- Also see: [How to Write a Ruby on Rails App for STEEM](https://steemit.com/radiator/@inertia/how-to-write-a-ruby-on-rails-app-for-steem)
post_id | 2,451,592 |
---|---|
author | inertia |
permlink | how-to-configure-your-mac-to-do-ruby-on-rails-development |
category | ruby |
json_metadata | "{"app": "steemit/0.1", "format": "markdown", "links": ["https://www.macports.org/", "https://rvm.io/", "http://localhost:3000/", "https://anvilformac.com", "http://hello_world.dev", "https://atom.io/", "https://steemit.com/radiator/@inertia/how-to-write-a-ruby-on-rails-app-for-steem"], "image": ["https://cl.ly/1L0R0C0v2J16/Screen%20Shot%202017-04-21%20at%202.51.47%20PM.png"], "tags": ["ruby", "rails", "development", "howto"]}" |
created | 2017-04-22 15:58:18 |
last_update | 2017-04-22 15:58:18 |
depth | 0 |
children | 5 |
net_rshares | 15,015,967,504,968 |
last_payout | 2017-04-29 15:58:18 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 12.010 SBD |
curator_payout_value | 1.324 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 2,945 |
author_reputation | 227,335,189,892,062 |
root_title | "How To Configure Your Mac to do Ruby on Rails Development" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 0 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
wackou | 0 | 610,262,542,644 | 9.19% | ||
sandra | 0 | 38,396,763,204 | 70% | ||
ihashfury | 0 | 25,661,189,583 | 48.3% | ||
lovejoy | 0 | 9,267,111,276 | 23% | ||
jason | 0 | 34,537,893,383 | 48.3% | ||
pairmike | 0 | 79,502,095,017 | 100% | ||
pheonike | 0 | 10,443,346,491 | 6% | ||
patrice | 0 | 2,489,367,182 | 23% | ||
makishart | 0 | 16,620,609,782 | 85% | ||
nomoreheroes7 | 0 | 12,889,346,548 | 100% | ||
carlos-cabeza | 0 | 757,799,868 | 23% | ||
gavvet | 0 | 3,445,828,462,307 | 100% | ||
teamsteem | 0 | 493,674,485,247 | 100% | ||
cryptoctopus | 0 | 1,706,966,024,849 | 100% | ||
lola-carola | 0 | 403,688,067 | 20% | ||
steve-walschot | 0 | 40,897,013,172 | 100% | ||
dragonslayer109 | 0 | 425,637,986,641 | 100% | ||
brich | 0 | 2,508,618,563 | 23% | ||
applecrisp | 0 | 53,292,082 | 20% | ||
samether | 0 | 4,934,645,328 | 100% | ||
raphaelom | 0 | 526,223,032 | 100% | ||
geoffrey | 0 | 415,252,918,004 | 100% | ||
crok | 0 | 7,475,108,283 | 100% | ||
jparty | 0 | -20,286,776,099 | -100% | ||
bacchist | 0 | 68,299,083,635 | 100% | ||
michaellamden68 | 0 | 2,742,017,362 | 100% | ||
good-karma | 0 | 78,515,215,616 | 23% | ||
joshbreslauer | 0 | 333,917,660,949 | 80% | ||
robrigo | 0 | 488,123,107,253 | 100% | ||
r4fken | 0 | 160,700,692 | 100% | ||
furion | 0 | 74,499,024,567 | 8.8% | ||
vi1son | 0 | 36,470,357,435 | 100% | ||
ardina | 0 | 3,828,915,940 | 100% | ||
anyx | 0 | 55,690,219,719 | 23% | ||
speda | 0 | 134,492,226,402 | 100% | ||
deviedev | 0 | 8,327,951,628 | 100% | ||
pkattera | 0 | 91,877,513,845 | 23% | ||
inertia | 0 | 264,782,330,852 | 100% | ||
arcange | 0 | 8,343,657,207 | 23% | ||
coininstant | 0 | 41,046,398,697 | 100% | ||
ubg | 0 | 184,543,278,673 | 100% | ||
deanliu | 0 | 54,030,091,513 | 100% | ||
seb | 0 | 641,691,177 | 100% | ||
raymonjohnstone | 0 | 11,562,211,320 | 100% | ||
mysteem | 0 | 337,490,046 | 23% | ||
sergey44 | 0 | 831,112,501 | 100% | ||
greenman | 0 | 546,240,212,937 | 100% | ||
happyphoenix | 0 | 296,681,410 | 4.59% | ||
michaeldodridge | 0 | 195,175,796,006 | 100% | ||
dirty.hera | 0 | 281,554,726 | 100% | ||
transhuman | 0 | 4,733,690,027 | 44% | ||
laoyao | 0 | 30,048,249,863 | 100% | ||
sunshine | 0 | 110,478,357,840 | 100% | ||
kurtbeil | 0 | 163,772,728,432 | 100% | ||
jessicazheng | 0 | 1,160,506,198 | 23% | ||
dolov | 0 | 607,013,963 | 6% | ||
fishingvideos | 0 | 15,082,945,027 | 100% | ||
oflyhigh | 0 | 33,766,714,116 | 100% | ||
dudu-hoffman | 0 | 5,053,880,186 | 100% | ||
zentat | 0 | 0 | 100% | ||
ioc | 0 | 749,498,919,083 | 100% | ||
chinadaily | 0 | 29,955,566,813 | 100% | ||
helene | 0 | 44,563,565,143 | 100% | ||
virtualgrowth | 0 | 9,772,850,747 | 30% | ||
lamech-m | 0 | 4,989,059,159 | 100% | ||
ripplerm | 0 | 5,169,329,352 | 40% | ||
awgbibb | 0 | 117,908,539,206 | 100% | ||
demo | 0 | 69,855,427 | 23% | ||
jyp | 0 | 312,017,223,175 | 100% | ||
hilarski | 0 | 43,143,499,551 | 20% | ||
runridefly | 0 | 11,015,693,442 | 12% | ||
stephenkendal | 0 | 68,785,326,591 | 100% | ||
richardcrill | 0 | 32,534,112,253 | 100% | ||
team101 | 0 | 291,267,139 | 100% | ||
titusfrost | 0 | 46,936,928,148 | 100% | ||
profitgenerator | 0 | 50,035,084,415 | 100% | ||
steemit79 | 0 | 50,449,176 | 100% | ||
maarnio | 0 | 8,453,139,639 | 100% | ||
ebargains | 0 | 7,808,688,368 | 23% | ||
jacobts | 0 | 14,519,423,721 | 100% | ||
jonathanyoung | 0 | 24,146,509,690 | 100% | ||
jsg | 0 | 54,041,151,458 | 100% | ||
feruz | 0 | 99,767,156 | 23% | ||
bitcoinparadise | 0 | 14,427,763,451 | 100% | ||
pickoum | 0 | 21,845,227,184 | 100% | ||
lajulius | 0 | 8,654,043,047 | 100% | ||
thegame | 0 | 521,747,958 | 10% | ||
steembets | 0 | 633,352,347 | 10% | ||
dodders007 | 0 | 48,271,695,670 | 100% | ||
zoee | 0 | 172,719,068 | 23% | ||
sjennon | 0 | 602,827,345 | 4.59% | ||
abdullar | 0 | 712,844,944,038 | 20% | ||
abudar | 0 | 8,141,718,414 | 100% | ||
steemsports | 0 | 8,808,745,146 | 9.68% | ||
steemvest17 | 0 | 3,805,730,386 | 23% | ||
lalala | 0 | 2,451,121,321 | 100% | ||
steem-meme | 0 | 1,782,225,570 | 20% | ||
created | 0 | 1,019,919,426,886 | 10% | ||
sunscape | 0 | 10,917,563,931 | 20% | ||
keuudeip | 0 | 31,732,092,052 | 100% | ||
stray | 0 | 0 | 100% | ||
thejohalfiles | 0 | 263,644,863,543 | 1% | ||
ejhaasteem | 0 | 17,473,568,113 | 100% | ||
missk | 0 | 1,782,743,463 | 100% | ||
steemland.com | 0 | 531,204,775 | 10% | ||
angel76 | 0 | 16,427,435,683 | 100% | ||
sqube | 0 | 140,361,446,945 | 100% | ||
cathynsons | 0 | 14,563,163,127 | 100% | ||
crowdfundedwhale | 0 | 42,669,602,991 | 65% | ||
trans-juanmi | 0 | 6,870,527,172 | 60% | ||
johnathanhenry | 0 | 125,365,443 | 100% | ||
j3dy | 0 | 4,905,719,974 | 100% | ||
doodleman | 0 | 4,022,813,115 | 100% | ||
gutzofter | 0 | 108,207,980,183 | 100% | ||
esteemapp | 0 | 71,969,873 | 23% | ||
steemprentice | 0 | 17,889,804,503 | 30% | ||
spbesner | 0 | 4,029,365,669 | 100% | ||
reisman | 0 | 733,019,767 | 23% | ||
damiendecoster | 0 | 838,618,764 | 100% | ||
finder | 0 | 525,818,953 | 100% | ||
seablue | 0 | 89,385,235,997 | 100% | ||
vcelier | 0 | 236,774,990,364 | 23% | ||
gildar | 0 | 3,606,177,988 | 100% | ||
juliosalas | 0 | 937,727,473 | 60% | ||
dddcoinz | 0 | 1,143,785,074 | 100% | ||
tamersameeh | 0 | 646,528,734 | 100% | ||
mathworksheets | 0 | 4,065,838,041 | 100% | ||
bbkoopsta | 0 | 1,006,355,459 | 100% | ||
darth-azrael | 0 | 7,318,012,854 | 80% | ||
steemcenterwiki | 0 | 882,953,440 | 100% | ||
fisteganos | 0 | 10,879,547,716 | 80% | ||
dalek | 0 | 223,855,338 | 100% | ||
elgeko | 0 | 5,338,527,391 | 23% | ||
bounties | 0 | 133,075,931 | 23% | ||
steempoll | 0 | 100,371,634 | 23% | ||
janmarysmith | 0 | 175,362,375 | 100% | ||
vermute | 0 | 243,244,478 | 11.5% | ||
kuvo | 0 | 109,188,389 | 11.5% | ||
derbi | 0 | 265,836,247 | 11.5% | ||
ogochukwu | 0 | 1,587,020,891 | 23% | ||
smalltalk | 0 | 154,826,639 | 4.59% | ||
tonylondon | 0 | 961,468,460 | 100% | ||
dunia | 0 | 1,078,088,644 | 15% | ||
theyeti | 0 | 26,118,060,943 | 8% | ||
buzzbeergeek | 0 | 5,301,110,824 | 100% | ||
evildeathcore | 0 | 2,400,875,692 | 100% | ||
bedroomshaman | 0 | 1,501,682,874 | 100% | ||
akela | 0 | 3,227,587,311 | 100% | ||
mckenziegary | 0 | 392,588,949 | 4.59% | ||
inna-yatsuk | 0 | 1,206,741,244 | 100% | ||
rdollarsign | 0 | 7,447,820,321 | 100% | ||
mhaimo | 0 | 119,351,841 | 11.5% | ||
illuminated | 0 | 93,508,290 | 100% | ||
contact95 | 0 | 1,330,316,186 | 100% | ||
kebin | 0 | 1,169,620,527 | 100% | ||
aismor | 0 | 2,169,965,182 | 100% | ||
the50 | 0 | 2,394,279,728 | 100% | ||
lyaandayani | 0 | 214,822,429 | 23% | ||
ramasarraj | 0 | 1,193,444,074 | 100% | ||
monaco | 0 | 1,193,442,060 | 100% | ||
leighhalliday | 0 | 0 | 100% |
Hey Anthony, why do you prefer ports over brew?
post_id | 2,452,767 |
---|---|
author | raphaelom |
permlink | re-inertia-how-to-configure-your-mac-to-do-ruby-on-rails-development-20170422t192530486z |
category | ruby |
json_metadata | "{"app": "steemit/0.1", "tags": ["ruby"]}" |
created | 2017-04-22 19:25:30 |
last_update | 2017-04-22 19:25:30 |
depth | 1 |
children | 1 |
net_rshares | 265,521,220,833 |
last_payout | 2017-04-29 19:25:30 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.039 SBD |
curator_payout_value | 0.013 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 47 |
author_reputation | 242,971,623,482 |
root_title | "How To Configure Your Mac to do Ruby on Rails Development" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
inertia | 0 | 264,782,330,852 | 100% | ||
tamersameeh | 0 | 738,889,981 | 100% |
I have nothing against brew. But most of the things I need are provided by ports. For example, having multiple versions of Postgres is important for my development process.
post_id | 2,452,970 |
---|---|
author | inertia |
permlink | re-raphaelom-re-inertia-how-to-configure-your-mac-to-do-ruby-on-rails-development-20170422t195148956z |
category | ruby |
json_metadata | "{"app": "steemit/0.1", "tags": ["ruby"]}" |
created | 2017-04-22 19:51:48 |
last_update | 2017-04-22 19:51:48 |
depth | 2 |
children | 0 |
net_rshares | 526,223,032 |
last_payout | 2017-04-29 19:51:48 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 174 |
author_reputation | 227,335,189,892,062 |
root_title | "How To Configure Your Mac to do Ruby on Rails Development" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
raphaelom | 0 | 526,223,032 | 100% |
These commands aren't working <i>$ sudo port install gnupg gnupg<i/> i am using el captain OX for mac ports on my macbook. What am i doing wrong mate?
post_id | 33,408,718 |
---|---|
author | bartcardi |
permlink | re-inertia-how-to-configure-your-mac-to-do-ruby-on-rails-development-20180218t021441224z |
category | ruby |
json_metadata | "{"app": "steemit/0.1", "tags": ["ruby"]}" |
created | 2018-02-18 02:14:42 |
last_update | 2018-02-18 02:14:42 |
depth | 1 |
children | 2 |
net_rshares | 0 |
last_payout | 2018-02-25 02:14:42 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 152 |
author_reputation | 3,940,538,323,363 |
root_title | "How To Configure Your Mac to do Ruby on Rails Development" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
What error are you seeing?
post_id | 33,409,312 |
---|---|
author | inertia |
permlink | re-bartcardi-re-inertia-how-to-configure-your-mac-to-do-ruby-on-rails-development-20180218t021830887z |
category | ruby |
json_metadata | "{"app": "steemit/0.1", "tags": ["ruby"]}" |
created | 2018-02-18 02:18:30 |
last_update | 2018-02-18 02:18:30 |
depth | 2 |
children | 1 |
net_rshares | 0 |
last_payout | 2018-02-25 02:18:30 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 26 |
author_reputation | 227,335,189,892,062 |
root_title | "How To Configure Your Mac to do Ruby on Rails Development" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
When i use the commands all of them aren't working why is that? ![Schermafbeelding 2018-02-18 om 05.49.49.png](https://steemitimages.com/DQmSrcjrMhH3vTxctK7bqpfUcpnzvLwnh2CarySBA7RuhWx/Schermafbeelding%202018-02-18%20om%2005.49.49.png)
post_id | 33,431,412 |
---|---|
author | bartcardi |
permlink | re-inertia-re-bartcardi-re-inertia-how-to-configure-your-mac-to-do-ruby-on-rails-development-20180218t045006574z |
category | ruby |
json_metadata | "{"app": "steemit/0.1", "image": ["https://steemitimages.com/DQmSrcjrMhH3vTxctK7bqpfUcpnzvLwnh2CarySBA7RuhWx/Schermafbeelding%202018-02-18%20om%2005.49.49.png"], "tags": ["ruby"]}" |
created | 2018-02-18 04:50:06 |
last_update | 2018-02-18 04:50:06 |
depth | 3 |
children | 0 |
net_rshares | 0 |
last_payout | 2018-02-25 04:50:06 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 235 |
author_reputation | 3,940,538,323,363 |
root_title | "How To Configure Your Mac to do Ruby on Rails Development" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |