Agile Web Development with Rails, Edition 5

20 Active Record 18 Retrospective

19 Finding Your Way Around

rails db:version
Current version: 20171113000009
edit lib/tasks/db_schema_migrations.rake
namespace :db do
  desc "Prints the migrated versions"
  task :schema_migrations => :environment do
    puts ActiveRecord::Base.connection.select_values(
      'select version from schema_migrations order by version' )
  end
end
rails db:schema_migrations
20171113000001
20171113000002
20171113000003
20171113000004
20171113000005
20171113000006
20171113000007
20171113000008
20171113000009
ls log
development.log
production.log
test.log
find script -type f
find: `script': No such file or directory
echo "puts $:" | IRBRC=tmp/irbrc ruby bin/rails console
Loading development environment (Rails 5.2.0.alpha)
Switch to inspect mode.
>> puts $:
/home/rubys/git/awdwr/edition4/work/depot/lib
/home/rubys/git/awdwr/edition4/work/depot/vendor
/home/rubys/git/awdwr/edition4/work/depot/app/assets
/home/rubys/git/awdwr/edition4/work/depot/app/channels
/home/rubys/git/awdwr/edition4/work/depot/app/controllers
/home/rubys/git/awdwr/edition4/work/depot/app/controllers/concerns
/home/rubys/git/awdwr/edition4/work/depot/app/helpers
/home/rubys/git/awdwr/edition4/work/depot/app/javascript
/home/rubys/git/awdwr/edition4/work/depot/app/jobs
/home/rubys/git/awdwr/edition4/work/depot/app/mailers
/home/rubys/git/awdwr/edition4/work/depot/app/models
/home/rubys/git/awdwr/edition4/work/depot/app/models/concerns
/home/rubys/.rvm/gems/ruby-2.4.1/gems/i18n-js-3.0.2/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/i18n-js-3.0.2/app/assets
/home/rubys/.rvm/gems/ruby-2.4.1/gems/webpacker-3.0.2/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/turbolinks-5.0.1/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/coffee-rails-4.2.2/lib
/home/rubys/git/rails/actioncable/lib
/home/rubys/git/rails/actioncable/app/assets
/home/rubys/git/rails/activestorage/lib
/home/rubys/git/rails/activestorage/app/assets
/home/rubys/git/rails/activestorage/app/controllers
/home/rubys/git/rails/activestorage/app/javascript
/home/rubys/git/rails/activestorage/app/jobs
/home/rubys/git/rails/activestorage/app/models
/home/rubys/git/rails/actionview/lib
/home/rubys/git/rails/actionview/app/assets
/home/rubys/.rvm/gems/ruby-2.4.1/gems/bundler-1.16.0/lib
/home/rubys/git/web-console/lib
/home/rubys/git/sass-rails/lib
/home/rubys/git/arel/lib
/home/rubys/git/rb-inotify/lib
/home/rubys/git/resque-scheduler/lib
/home/rubys/git/queue_classic/lib
/home/rubys/git/gorp/lib
/home/rubys/git/rails/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/uglifier-3.2.0/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/turbolinks-source-5.0.3/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/sqlite3-1.3.13/lib
/home/rubys/.rvm/gems/ruby-2.4.1/extensions/x86_64-linux/2.4.0/sqlite3-1.3.13
/home/rubys/.rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/selenium-webdriver-3.7.0/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/sass-3.5.3/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/sass-listen-4.0.0/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/rubyzip-1.2.1/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/rufus-scheduler-3.4.2/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/resque-1.27.4/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/vegas-0.1.11/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/sinatra-2.0.0/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/tilt-2.0.8/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/redis-namespace-1.6.0/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/redis-4.0.1/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/rb-fsevent-0.10.2/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/sprockets-rails-3.2.1/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/sprockets-3.7.1/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/rack-proxy-0.6.2/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/rack-protection-2.0.0/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/puma-3.10.0/lib
/home/rubys/.rvm/gems/ruby-2.4.1/extensions/x86_64-linux/2.4.0/puma-3.10.0
/home/rubys/.rvm/gems/ruby-2.4.1/gems/pg-0.19.0/lib
/home/rubys/.rvm/gems/ruby-2.4.1/extensions/x86_64-linux/2.4.0/pg-0.19.0
/home/rubys/.rvm/gems/ruby-2.4.1/gems/mysql2-0.4.9/lib
/home/rubys/.rvm/gems/ruby-2.4.1/extensions/x86_64-linux/2.4.0/mysql2-0.4.9
/home/rubys/.rvm/gems/ruby-2.4.1/gems/mustermann-1.0.1/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/mono_logger-1.1.0/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/jbuilder-2.7.0/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/multi_json-1.12.2/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/et-orbi-1.0.8/lib
/home/rubys/git/rails/railties/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/thor-0.19.4/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/method_source-0.9.0/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/coffee-script-2.4.1/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/execjs-2.7.0/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/coffee-script-source-1.12.2/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/chromedriver-helper-1.1.0/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/childprocess-0.8.0/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/ffi-1.9.18/lib
/home/rubys/.rvm/gems/ruby-2.4.1/extensions/x86_64-linux/2.4.0/ffi-1.9.18
/home/rubys/.rvm/gems/ruby-2.4.1/gems/capybara-2.15.4/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/xpath-2.1.0/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/capistrano-rvm-0.1.2/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/capistrano-rails-1.3.0/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/capistrano-passenger-0.2.0/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/capistrano-bundler-1.3.0/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/capistrano-3.10.0/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/byebug-9.1.0/lib
/home/rubys/.rvm/gems/ruby-2.4.1/extensions/x86_64-linux/2.4.0/byebug-9.1.0
/home/rubys/.rvm/gems/ruby-2.4.1/gems/bootsnap-1.1.5/lib
/home/rubys/.rvm/gems/ruby-2.4.1/extensions/x86_64-linux/2.4.0/bootsnap-1.1.5
/home/rubys/.rvm/gems/ruby-2.4.1/gems/msgpack-1.1.0/lib
/home/rubys/.rvm/gems/ruby-2.4.1/extensions/x86_64-linux/2.4.0/msgpack-1.1.0
/home/rubys/.rvm/gems/ruby-2.4.1/gems/bindex-0.5.0/lib
/home/rubys/.rvm/gems/ruby-2.4.1/extensions/x86_64-linux/2.4.0/bindex-0.5.0
/home/rubys/.rvm/gems/ruby-2.4.1/gems/bcrypt-3.1.11/lib
/home/rubys/.rvm/gems/ruby-2.4.1/extensions/x86_64-linux/2.4.0/bcrypt-3.1.11
/home/rubys/.rvm/gems/ruby-2.4.1/gems/archive-zip-0.7.0/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/io-like-0.3.0/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/airbrussh-1.3.0/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/sshkit-1.15.0/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/net-scp-1.2.1/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/net-ssh-4.2.0/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/addressable-2.5.2/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/public_suffix-3.0.1/lib
/home/rubys/git/rails/activerecord/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/activemodel-serializers-xml-1.0.2/lib
/home/rubys/git/rails/activemodel/lib
/home/rubys/git/rails/actionmailer/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/mail-2.7.0/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/mini_mime-1.0.0/lib
/home/rubys/git/rails/activejob/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/globalid-0.4.1/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/websocket-driver-0.6.5/lib
/home/rubys/.rvm/gems/ruby-2.4.1/extensions/x86_64-linux/2.4.0/websocket-driver-0.6.5
/home/rubys/.rvm/gems/ruby-2.4.1/gems/websocket-extensions-0.1.3/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/nio4r-2.1.0/lib
/home/rubys/.rvm/gems/ruby-2.4.1/extensions/x86_64-linux/2.4.0/nio4r-2.1.0
/home/rubys/git/rails/actionpack/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/rack-test-0.7.0/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/rack-2.0.3/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/rails-html-sanitizer-1.0.3/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/loofah-2.1.1/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/crass-1.0.2/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/rails-dom-testing-2.0.3/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/nokogiri-1.8.1/lib
/home/rubys/.rvm/gems/ruby-2.4.1/extensions/x86_64-linux/2.4.0/nokogiri-1.8.1
/home/rubys/.rvm/gems/ruby-2.4.1/gems/mini_portile2-2.3.0/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/erubi-1.7.0/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/builder-3.2.3/lib
/home/rubys/git/rails/activesupport/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/tzinfo-1.2.4/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/thread_safe-0.3.6/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/minitest-5.10.3/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/i18n-0.9.1/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/concurrent-ruby-1.0.5/lib
/home/rubys/.rvm/gems/ruby-2.4.1/gems/rake-12.2.1/lib
/home/rubys/.rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0
/home/rubys/.rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/x86_64-linux
/home/rubys/.rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby
/home/rubys/.rvm/rubies/ruby-2.4.1/lib/ruby/vendor_ruby/2.4.0
/home/rubys/.rvm/rubies/ruby-2.4.1/lib/ruby/vendor_ruby/2.4.0/x86_64-linux
/home/rubys/.rvm/rubies/ruby-2.4.1/lib/ruby/vendor_ruby
/home/rubys/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0
/home/rubys/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/x86_64-linux
=> nil
>> 

20 Active Record 18 Retrospective