3
3

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環境セットアップ

Last updated at Posted at 2016-04-03

505 mkdir ligareus
506 ruby -v
507 rbenv versions
508 rbenv -h
509 rbenv install 2.6.5
510 rbenv install --list
511 brew update
512 brew upgrade ruby-build
513 rbenv install --list | grep 2.6
514 rbenv install 2.6.5
515 ruby -v
516 rbenv local 2.6.5
517 rbenv rehash
518 ruby -v
519 bundle -v
520 gem update bundler
521 mysql -v
522 which mysql
523 which mysql2
524 ps -ef | grep mysql
525 git
526 git status
527 ls
528 cd visa
529 ruby -v
530 cd ..
531 ls
532 cd ligareus/
533 ruby -v
534 bundle init
535 code .
536 bundle install --path vendor/bundle
537 be rails -v
538 bundle exec rails new . --skip-test --skip-bundle -d mysql --skip-turbolinks
539 bundle install --path vendor/bundle/
540 git init
541 subl ./../visa/
542 git status
543 git add .
544 git commit -m "initial commit"
545 pwd
546 history
masayuki-no-MacBook-Air-2:ligareus masayuki$
547 bundle exec rails webpacker:install
548 git status
549 be rails s
550 be rake db:create

iTerm
https://www.iterm2.com/
homebrew
http://brew.sh/

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

rbenv
https://github.com/rbenv/rbenv

brew update
brew install rbenv ruby-build
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile
source ~/.bash_profile

ruby
rbenv install --list
rbenv install 2.3.0
rbenv global 2.3.0

Mysql5.6
brew install homebrew/versions/mysql56
mkdir -p ~/Library/LaunchAgents

cp /usr/local/Cellar/mysql/5.6.23/homebrew.mxcl.mysql.plist ~/Library/LaunchAgents

launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql56.plist

Sequel Pro
http://www.sequelpro.com/

atom
https://atom.io/

プロジェクト作成
$ gem install bundler
$ mkdir project
$ cd project
$ bundle init
Writing new Gemfile to /path/to/project/Gemfile
$ vi Gemfile
A sample Gemfile

source "https://rubygems.org"
gem "rails"
$ bundle install --path vendor/bundle

$ bundle exec rails new . --skip-test --skip-bundle -d mysql --skip-turbolinks

Gitにプロジェクトを登録
git init
git add .
git c -m "initial commit"
Gemを導入
cp gem file
bundle install --path vendor/bundle
gemの設定
rails g config:install
development.rbを更新
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: "localhost",
port: 25,
domain: "localhost.localdomain"
}

Specify what domain to use for mailer URLs

config.action_mailer.default_url_options = {host: "localhost:3000"}
config.after_initialize do
Bullet.enable = true
Bullet.alert = true
Bullet.bullet_logger = true
Bullet.console = true
Bullet.raise = true
Bullet.add_footer = true
end
6.規約準拠確認
bundle exec rubocop
--auto-correct
必須jquery
jquery.bootstrap-growl.min
jquery.livequery.min
rails g scaffold user --skip-view-specs --skip-controller-specs --skip-routing-specs --skip-request-specs --skip-jbuilder --skip-stylesheets

3
3
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
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?