&tag(Rails6);
yarn install
yarn upgrade
namespace :deploy do
# サーバーにファイルをアップロードする
task upload_file: [:set_rails_env] do
on roles(:app) do |host|
upload!('config/master.key', "#{shared_path}/config/master.key")
# upload!('config/credentials.yml.enc', "#{shared_path}/config/credentials.yml.enc")
# execute 'echo "credentials.yml.enc upload!!"'
execute 'echo "master.key upload!!"'
end
end
before 'deploy:starting', 'deploy:upload_file'
end
gyp verb check python checking for Python executable "python2" in the PATH
{
"name": "rails61-demo",
"private": true,
"dependencies": {
"@rails/actioncable": "^6.0.0",
"@rails/activestorage": "^6.0.0",
"@rails/ujs": "^6.0.0",
"@rails/webpacker": "5.4.3",
"turbolinks": "^5.2.0",
"webpack": "^4.46.0",
"webpack-cli": "^3.3.12"
},
"version": "0.1.0",
"devDependencies": {
"webpack-dev-server": "^3"
}
}
bundle exec rails new $project_path --skip-bundle --database=mysql
source "http://rubygems.org" gem "rails", "6.0.3.5" gem 'bootsnap' gem 'webpacker' gem 'listen'
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery', // taking this out doesn't fix it
...
$("#my-modal").modal('show');
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#my-modal" data-remote="true"> Launch demo modal </button>
import jQuery from 'jquery' window.jQuery = window.$ = jQuery
yarn install