Category Ruby on Rails

(中文) [Rails] 常用指令彙整

(中文)
Rails
rails new #name rails destroy rails s (server) rails c (console) rails db (dbconsole)
Rails generate
rails g (generate) #name #parameter assets controller generator helper jbuilder mailer migration model scaffold task
Rake
rake about rake stats rake routes rake notes rake test rake test:models rake db:create rake db:drop rake db:migrate rake db:rollback
Tag
link_to button_to content_tag javascript_include_tag stylesheet_link_tag image_tag

[Rails] Mac Install Ruby

1. Install Homebrew ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 2. Install Ruby brew install ruby 3. Install RubyGems ruby setup.rb 4. Install Rails gem install rails --no-ri --no-rdoc