in Rails 4.0, you could use `/dev/stdin` on both Linux and Mac, but with the switch to Kernel.load in Rails 4.1, this broke on Linux (you get a LoadError). Instead, explicitly detect `-` as meaning stdin, then read from stdin explicitly, instead of performing file gymnastics. This should now work on any platform uniformly. Passing a script via stdin is useful when you're sshing to a server, and the script you want to run is stored locally. You could theoretically pass the entire script on the command line, but in reality you'll run into problems with the command being too long.
2.3 KiB
-
Support
-
as a platform-agnostic way to run a script from stdin withrails runner
Cody Cutrer
-
Add
bootsnap
to defaultGemfile
.Burke Libbey
-
Properly expand shortcuts for environment's name running the
console
anddbconsole
commands.Robin Dupret
-
Passing the environment's name as a regular argument to the
rails dbconsole
andrails console
commands is deprecated. The-e
option should be used instead.Previously:
$ bin/rails dbconsole production
Now:
$ bin/rails dbconsole -e production
Robin Dupret, Kasper Timm Hansen
-
Allow to pass a custom connection name to the
rails dbconsole
command when using a 3-level database configuration.$ bin/rails dbconsole -c replica
Robin Dupret, Jeremy Daer
-
Skip unused components when running
bin/rails app:update
.If the initial app generation skipped Action Cable, Active Record etc., the update task honors those skips too.
Yuji Yaginuma
-
Make Rails' test runner work better with minitest plugins.
By demoting the Rails test runner to just another minitest plugin — and thereby not eager loading it — we can co-exist much better with other minitest plugins such as pride and minitest-focus.
Kasper Timm Hansen
-
Load environment file in
dbconsole
command.Fixes #29717
Yuji Yaginuma
-
Add
rails secrets:show
command.Yuji Yaginuma
-
Allow mounting the same engine several times in different locations.
Fixes #20204.
David Rodríguez
-
Clear screenshot files in
tmp:clear
task.Yuji Yaginuma
-
Add
railtie.rb
to the plugin generatorTsukuru Tanimichi
-
Deprecate
capify!
method in generators and templates.Yuji Yaginuma
-
Allow irb options to be passed from
rails console
command.Fixes #28988.
Yuji Yaginuma
-
Added a shared section to
config/database.yml
that will be loaded for all environments.Pierre Schambacher
-
Namespace error pages' CSS selectors to stop the styles from bleeding into other pages when using Turbolinks.
Jan Krutisch
Please check 5-1-stable for previous changes.