9
13

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Mac + Rails + Eclipse 開発環境/アプリケーションを3分で構築

Last updated at Posted at 2016-08-16

仕事等で急遽Railsをやることになった方のために。

前提条件

Homebrew とEclipseは既にインストール済みとします。

rbenvを入れる。rubyのバージョンを管理できるようにするため

brew update
brew install rbenv ruby-build

起動時に自動で初期化できるようにしておく

echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
source ~/.bash_profile

現在 インストール可能なバージョン等を確認

rbenv install -l 

入れたいrubyバージョンを入れる

rbenv install 2.3.1
rbenv rehash
rbenv global 2.3.1
ruby -v

Railsアプリに必要なgemをインストール

gem install bundler
gem install rails
rbenv rehash

Eclipse に RadRailsプラグインを入れる。

Help > Install new Software で 以下のアドレスを追加。

http://download.aptana.com/studio3/plugin/install

Aptana Studio 3 plugin をインストールする

Rails アプリケーションを作る

File > New > Rails ProjectからRailsアプリケーションのひな型がワークスペースに作ることができる。

既存のコード(リポジトリ)がある場合は File > New > Rails Project で出てきた画面のGenerate APPで Clone an existing git project を選ぶ。

起動

  • Aptanaのツールバーが表示されている場合
    aptanaのウィンドウ→ビューの表示→サーバー を選択し、プロジェクトとサーバーのタイプを選び作成

  • Aptanaのツールバーが表示できない場合
    Run > Rails Console からConsoleを開き、 rails server と打てば localhost:3000でたちあがる。

9
13
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
13

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?