xiaowei@xiaoweimac ⮀ ~/rubyspace ⮀ ⭠ master± ⮀ ls
hello_app toy_app toy_app_01
xiaowei@xiaoweimac ⮀ ~/rubyspace ⮀ ⭠ master± ⮀ cd toy_app_01
xiaowei@xiaoweimac ⮀ ~/rubyspace/toy_app_01 ⮀ ⭠ master± ⮀ rails generate scaffold User name:string email:string
Running via Spring preloader in process 89152
invoke active_record
create db/migrate/20191019133936_create_users.rb
create app/models/user.rb
invoke test_unit
create test/models/user_test.rb
create test/fixtures/users.yml
invoke resource_route
route resources :users
invoke scaffold_controller
create app/controllers/users_controller.rb
invoke erb
create app/views/users
create app/views/users/index.html.erb
create app/views/users/edit.html.erb
create app/views/users/show.html.erb
create app/views/users/new.html.erb
create app/views/users/_form.html.erb
invoke test_unit
create test/controllers/users_controller_test.rb
create test/system/users_test.rb
invoke helper
create app/helpers/users_helper.rb
invoke test_unit
invoke jbuilder
create app/views/users/index.json.jbuilder
create app/views/users/show.json.jbuilder
create app/views/users/_user.json.jbuilder
invoke assets
invoke coffee
create app/assets/javascripts/users.coffee
invoke scss
create app/assets/stylesheets/users.scss
invoke scss
create app/assets/stylesheets/scaffolds.scss
xiaowei@xiaoweimac ⮀ ~/rubyspace/toy_app_01 ⮀ ⭠ master± ⮀ rake db:migrate
== 20191019133936 CreateUsers: migrating ======================================
— create_table(:users)
-> 0.0010s
== 20191019133936 CreateUsers: migrated (0.0012s) =============================
xiaowei@xiaoweimac ⮀ ~/rubyspace/toy_app_01 ⮀ ⭠ master± ⮀ atom .
xiaowei@xiaoweimac ⮀ ~/rubyspace/toy_app_01 ⮀ ⭠ master± ⮀ rails s
=> Booting Puma
=> Rails 5.2.3 application starting in development
=> Run `rails server -h` for more startup options
Puma starting in single mode…
* Version 3.12.1 (ruby 2.4.4-p296), codename: Llamas in Pajamas
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://localhost:3000
Use Ctrl-C to stop
Started GET “/users” for ::1 at 2019–10–19 21:40:37 +0800
(0.4ms) SELECT “schema_migrations”.”version” FROM “schema_migrations” ORDER BY “schema_migrations”.”version” ASC
↳ /Users/xiaowei/.rvm/gems/ruby-2.4.4/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:98
Processing by UsersController#index as HTML
Rendering users/index.html.erb within layouts/application
User Load (0.5ms) SELECT “users”.* FROM “users”
↳ app/views/users/index.html.erb:15
Rendered users/index.html.erb within layouts/application (6.7ms)
Completed 500 Internal Server Error in 345ms (ActiveRecord: 0.8ms)
ActionView::Template::Error (dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.63.dylib
Referenced from: /usr/local/bin/node
Reason: image not found
):
5: <%= csrf_meta_tags %>
6: <%= csp_meta_tag %>
7:
8: <%= stylesheet_link_tag ‘application’, media: ‘all’, ‘data-turbolinks-track’: ‘reload’ %>
9: <%= javascript_include_tag ‘application’, ‘data-turbolinks-track’: ‘reload’ %>
10: </head>
11:
(execjs):1
app/views/layouts/application.html.erb:8:in `_app_views_layouts_application_html_erb___4306673661580648549_70345318842600'
Started GET “/” for ::1 at 2019–10–19 21:40:42 +0800
Processing by UsersController#index as HTML
Rendering users/index.html.erb within layouts/application
User Load (0.1ms) SELECT “users”.* FROM “users”
↳ app/views/users/index.html.erb:15
Rendered users/index.html.erb within layouts/application (1.8ms)
Completed 500 Internal Server Error in 57ms (ActiveRecord: 0.1ms)
ActionView::Template::Error (dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.63.dylib
Referenced from: /usr/local/bin/node
Reason: image not found
):
5: <%= csrf_meta_tags %>
6: <%= csp_meta_tag %>
7:
8: <%= stylesheet_link_tag ‘application’, media: ‘all’, ‘data-turbolinks-track’: ‘reload’ %>
9: <%= javascript_include_tag ‘application’, ‘data-turbolinks-track’: ‘reload’ %>
10: </head>
11:
(execjs):1
app/views/layouts/application.html.erb:8:in `_app_views_layouts_application_html_erb___4306673661580648549_70345369491280'
^C- Gracefully stopping, waiting for requests to finish
=== puma shutdown: 2019–10–19 21:51:37 +0800 ===
- Goodbye!
Exiting
xiaowei@xiaoweimac ⮀ ~/rubyspace/toy_app_01 ⮀ ⭠ master± ⮀ cd
xiaowei@xiaoweimac ⮀ ~ ⮀ ⭠ master± ⮀ brew uninstall — force node
Error: Refusing to uninstall /usr/local/Cellar/node/11.3.0_1
because it is required by yarn, which is currently installed.
You can override this and force removal with:
brew uninstall — ignore-dependencies node
✘ xiaowei@xiaoweimac ⮀ ~ ⮀ ⭠ master± ⮀ brew uninstall — ignore-dependencies node
Uninstalling /usr/local/Cellar/node/11.3.0_1… (3,951 files, 47.5MB)
node 9.10.1 and 8.7.0 are still installed.
Remove all versions with `brew uninstall — force node`.
xiaowei@xiaoweimac ⮀ ~ ⮀ ⭠ master± ⮀ brew uninstall — force node
Uninstalling node… (8,970 files, 96.3MB)
xiaowei@xiaoweimac ⮀ ~ ⮀ ⭠ master± ⮀ brew uninstall icu4c && brew install icu4c
Error: Refusing to uninstall /usr/local/Cellar/icu4c/64.2
because it is required by postgresql, which is currently installed.
You can override this and force removal with:
brew uninstall — ignore-dependencies icu4c
✘ xiaowei@xiaoweimac ⮀ ~ ⮀ ⭠ master± ⮀ brew uninstall — ignore-dependencies icu4c
Uninstalling /usr/local/Cellar/icu4c/64.2… (257 files, 69.5MB)
icu4c 63.1 is still installed.
Remove all versions with `brew uninstall — force icu4c`.
xiaowei@xiaoweimac ⮀ ~ ⮀ ⭠ master± ⮀ brew uninstall — force icu4c
Uninstalling icu4c… (254 files, 68.4MB)
xiaowei@xiaoweimac ⮀ ~ ⮀ ⭠ master± ⮀ brew unlink icu4c && brew link icu4c — force
Error: No such keg: /usr/local/Cellar/icu4c
✘ xiaowei@xiaoweimac ⮀ ~ ⮀ ⭠ master± ⮀ brew install node
Updating Homebrew…
==> Installing dependencies for node: icu4c
==> Installing node dependency: icu4c
==> Downloading https://homebrew.bintray.com/bottles/icu4c-64.2.high_sierra.bott
Already downloaded: /Users/xiaowei/Library/Caches/Homebrew/downloads/2a128d246208150aaf2129d43d5f0561a1ce659a28444b9c5ac51625bfe86d16 — icu4c-64.2.high_sierra.bottle.tar.gz
==> Pouring icu4c-64.2.high_sierra.bottle.tar.gz
==> Caveats
icu4c is keg-only, which means it was not symlinked into /usr/local,
because macOS provides libicucore.dylib (but nothing else).
If you need to have icu4c first in your PATH run:
echo ‘export PATH=”/usr/local/opt/icu4c/bin:$PATH”’ >> ~/.zshrc
echo ‘export PATH=”/usr/local/opt/icu4c/sbin:$PATH”’ >> ~/.zshrc
For compilers to find icu4c you may need to set:
export LDFLAGS=”-L/usr/local/opt/icu4c/lib”
export CPPFLAGS=”-I/usr/local/opt/icu4c/include”
For pkg-config to find icu4c you may need to set:
export PKG_CONFIG_PATH=”/usr/local/opt/icu4c/lib/pkgconfig”
==> Summary
🍺 /usr/local/Cellar/icu4c/64.2: 257 files, 69.5MB
==> Installing node
==> Downloading https://homebrew.bintray.com/bottles/node-12.1.0.high_sierra.bot
==> Downloading from https://akamai.bintray.com/41/411a1920d1878940b3c7578682e5b
######################################################################## 100.0%
==> Pouring node-12.1.0.high_sierra.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
/usr/local/etc/bash_completion.d
==> Summary
🍺 /usr/local/Cellar/node/12.1.0: 4,505 files, 51.7MB
==> Caveats
==> icu4c
icu4c is keg-only, which means it was not symlinked into /usr/local,
because macOS provides libicucore.dylib (but nothing else).
If you need to have icu4c first in your PATH run:
echo ‘export PATH=”/usr/local/opt/icu4c/bin:$PATH”’ >> ~/.zshrc
echo ‘export PATH=”/usr/local/opt/icu4c/sbin:$PATH”’ >> ~/.zshrc
For compilers to find icu4c you may need to set:
export LDFLAGS=”-L/usr/local/opt/icu4c/lib”
export CPPFLAGS=”-I/usr/local/opt/icu4c/include”
For pkg-config to find icu4c you may need to set:
export PKG_CONFIG_PATH=”/usr/local/opt/icu4c/lib/pkgconfig”
==> node
Bash completion has been installed to:
/usr/local/etc/bash_completion.d
xiaowei@xiaoweimac ⮀ ~ ⮀ ⭠ master± ⮀ cd
xiaowei@xiaoweimac ⮀ ~ ⮀ ⭠ master± ⮀ ls
Applications
Desktop
Documents
Downloads
EV~2019.06.17~10.23.13.mp4
Exercise 10- What Was That?.mp4
Exercise 9- Printing, Printing, Printing.mp4
Library
MarkEditor
MarkEditorQuickNote
Movies
Music
MyApplication2
Pictures
Public
Untitled.ipynb
api_exercise
caihuahengyibook
newspace
railsbridge
ruby
rubyspace
workspace
文件使用
未命名文件夹
xiaowei@xiaoweimac ⮀ ~ ⮀ ⭠ master± ⮀ cd rubyspace
xiaowei@xiaoweimac ⮀ ~/rubyspace ⮀ ⭠ master± ⮀ ls
hello_app toy_app toy_app_01
xiaowei@xiaoweimac ⮀ ~/rubyspace ⮀ ⭠ master± ⮀ cd toy_app_01
xiaowei@xiaoweimac ⮀ ~/rubyspace/toy_app_01 ⮀ ⭠ master± ⮀ rails s
=> Booting Puma
=> Rails 5.2.3 application starting in development
=> Run `rails server -h` for more startup options
Puma starting in single mode…
* Version 3.12.1 (ruby 2.4.4-p296), codename: Llamas in Pajamas
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://localhost:3000
Use Ctrl-C to stop
Started GET “/” for ::1 at 2019–10–19 22:20:55 +0800
(0.5ms) SELECT “schema_migrations”.”version” FROM “schema_migrations” ORDER BY “schema_migrations”.”version” ASC
↳ /Users/xiaowei/.rvm/gems/ruby-2.4.4/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:98
Processing by UsersController#index as HTML
Rendering users/index.html.erb within layouts/application
User Load (0.5ms) SELECT “users”.* FROM “users”
↳ app/views/users/index.html.erb:15
Rendered users/index.html.erb within layouts/application (4.1ms)
Completed 200 OK in 516ms (Views: 503.7ms | ActiveRecord: 0.8ms)