Han Yi
SSL Errors: brew install curl-ca-bundle cp /usr/local/opt/curl-ca-bundle/share/ca-bundle.crt `ruby -ropenssl -e 'puts OpenSSL::X509::DEFAULT_CERT_FILE'`
gem install rails bundler --no-document
Atom, Sublime Text 2, ...
<div class="container">
<%= yield %>
</div>
1.Add below text under <body>:
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">The Idea app</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="/ideas">Ideas</a></li>
</ul>
</div>
</div>
</nav>
2.Add below text before </body>:
<footer>
<div class="container">
Rails Girls 2017
</div>
</footer>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.js"></script>
3.Find application.css and at bottom add:
body { padding-top: 100px; }
footer { margin-top: 100px; }
table, td, th { vertical-align: middle; border: none; }
th { border-bottom: 1px solid #DDD; }
7.Find app/models/idea.rb
8.Under class Idea < ApplicationRecord add: mount_uploader :picture, PictureUploader
9.Find app/views/ideas/_form.html.erb
10.Change <%= form.text_field :picture, id: :idea_picture %> to <%= form.file_field :picture, id: :idea_picture %>
11.Find app/views/ideas/show.html.erb
12. Change <%= @idea.picture %> to <%= image_tag(@idea.picture_url, width: 600) if @idea.picture.present? %>
Find config/routes.rb, add root to: redirect('/ideas')
language: ruby
rvm:
- 2.4.1
https://docs.travis-ci.com/user/getting-started/
https://docs.cloudfoundry.org/buildpacks/ruby/gsg-ror.html
Create a new file under root path: manifest.yml
---
applications:
- name: rails-sample
memory: 256M
instances: 1
path: .
command: bundle exec rake db:migrate && bundle exec rails s -p $PORT
https://docs.cloudfoundry.org/buildpacks/ruby/gsg-ror.html
cf push input_your_project_name_here
visit console on http://run.pivotal.io/
visit your website
https://docs.cloudfoundry.org/buildpacks/ruby/gsg-ror.html
1. 课程成员必须参加串讲,相关主题将被强行指定(可在小范围内选择),如不愿意参加串讲则被视为非成员;
2. 课程成员如不能按时完成串讲或者无故缺课次数达到2次则被视为非成员;
3. 本课程座位会提前安排,如有非成员请自备座椅,并且由课程成员占用优先位置;
4. 课程成员可以随时提问并参与讨论,非成员不得在课程进行中参与有关讨论。
1. Model (Active Record, Migrations, Validation, Callback, Associations, Query Interface)
2. View (Action View, Layout, Rendering, Form Helpers)
3. Controller (Action Controller, Rails Routing)
4. Active Support
5. Testing
6. Securing
7. Debugging
8. Configuring
9. Rails Command Line
10. Active Job
11. Action Mailer
12. Rails Command Line
13. Asset Pipeline
14. Caching
15. Using Rails for API-only Applications
16. Action Cable