capistrano

Rails/Nginx not serving JS and CSS

百般思念 提交于 2020-01-23 09:47:52
问题 I deployed a Rails 3.2.8 application via Capistrano, with asset pipeline enabled, to my Linode server. It is running nginx + unicorn. When I visit my application, the minimised JS and CSS are not being served, although the assets are present in <RAILS_DIR>/public/assets . $ tree assets assets |-- application-66e477d6fd8cf088e8be44affeead089.css |-- application-66e477d6fd8cf088e8be44affeead089.css.gz |-- application-7d3ead38a0b5e276a97d48e52044ac31.js |-- application

Rails/Nginx not serving JS and CSS

巧了我就是萌 提交于 2020-01-23 09:47:48
问题 I deployed a Rails 3.2.8 application via Capistrano, with asset pipeline enabled, to my Linode server. It is running nginx + unicorn. When I visit my application, the minimised JS and CSS are not being served, although the assets are present in <RAILS_DIR>/public/assets . $ tree assets assets |-- application-66e477d6fd8cf088e8be44affeead089.css |-- application-66e477d6fd8cf088e8be44affeead089.css.gz |-- application-7d3ead38a0b5e276a97d48e52044ac31.js |-- application

How to get Capistrano 3 to use RVM ruby?

a 夏天 提交于 2020-01-23 08:18:03
问题 Gemfile: gem 'capistrano', '~> 3.0.0' gem 'capistrano-rails' gem 'capistrano-bundler' gem 'capistrano-rvm' gem 'capistrano3-puma' Deploy.rb: set :rvm_type, :user set :rvm_ruby_version, '2.1.1' set :default_env, { rvm_bin_path: '~/.rvm/bin' } Production.rb namespace :rails do desc "Open the rails console on primary app server" task :console do on roles(:app), primary: true do execute_interactively "#{current_path}/script/rails console RAILS_ENV=production" end end def execute_interactively

How to get Capistrano 3 to use RVM ruby?

允我心安 提交于 2020-01-23 08:17:25
问题 Gemfile: gem 'capistrano', '~> 3.0.0' gem 'capistrano-rails' gem 'capistrano-bundler' gem 'capistrano-rvm' gem 'capistrano3-puma' Deploy.rb: set :rvm_type, :user set :rvm_ruby_version, '2.1.1' set :default_env, { rvm_bin_path: '~/.rvm/bin' } Production.rb namespace :rails do desc "Open the rails console on primary app server" task :console do on roles(:app), primary: true do execute_interactively "#{current_path}/script/rails console RAILS_ENV=production" end end def execute_interactively

Rails/Capistrano tool to deploy static assets to Rackspace Cloud Files or Amazon Cloud Front?

我与影子孤独终老i 提交于 2020-01-23 03:43:04
问题 Is anyone aware of a tool that will automatically deploy a Rails app static assets to Rackspace Cloud Files or Amazon Cloud Front? In my perfect world capistrano would automatically upload everything in javascripts, stylesheets, and images then override the default image_tag and script_tags to route to the appropriate CDN path. It would be great if the deploy task created a new container with each deploy like cap creates a new release directory, or maybe it should use the same containers and

How do I set the shell to bash for run in Capistrano?

谁说胖子不能爱 提交于 2020-01-22 13:31:50
问题 How can I set the shell in the Capistrano run command to use bash instead of sh? I am trying to install RVM and I need to execute the command: run "bash < <(curl -L http://bit.ly/rvm-install-system-wide)" as in: task :install_rvm, :roles => :server do apps = %w(bison openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev sqlite3 libsqlite3-0 libxml2-dev libxslt-dev autoconf subversion libcurl4-openssl-dev) apt.install( {:base => apps}, :stable ) run "bash < <(curl -L

How do I set the shell to bash for run in Capistrano?

限于喜欢 提交于 2020-01-22 13:31:31
问题 How can I set the shell in the Capistrano run command to use bash instead of sh? I am trying to install RVM and I need to execute the command: run "bash < <(curl -L http://bit.ly/rvm-install-system-wide)" as in: task :install_rvm, :roles => :server do apps = %w(bison openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev sqlite3 libsqlite3-0 libxml2-dev libxslt-dev autoconf subversion libcurl4-openssl-dev) apt.install( {:base => apps}, :stable ) run "bash < <(curl -L

With Capistrano, how to rollback to a specific release?

时间秒杀一切 提交于 2020-01-22 09:01:08
问题 With Capistrano, how to rollback to a specific release? My server's folder has a /release folder, how can I rollback to a specific one? Is it possible for me to get a list of releases on my computer locally? I'm using GIT and this didn't work: cap deploy -s revision:HASH 回答1: Update The answer was written in the times of capistrano version 2. With the current capistrano version 3 you can achieve the same by using cap production deploy:rollback ROLLBACK_RELEASE=2010123 Please refer to the

Capistrano deploy: “Did not recognize your adapter specification” during assets:precompile

邮差的信 提交于 2020-01-21 14:36:28
问题 I'm getting this error and I think it's coming from this line of code in the multi_json gem but I'm not sleuthy enough to know why it's being triggered?!? Everything works fine in development and test but the deploy:assets:update_asset_mtimes task fails on cap deploy:migrations Any tips as to why this might be happening? multi_json has rev'd since last deploy so may try rolling back to previous version but would like to know why it's failing... Gory details: $ cap deploy:migrations ... * 2013

Capistrano deploy: “Did not recognize your adapter specification” during assets:precompile

怎甘沉沦 提交于 2020-01-21 14:36:08
问题 I'm getting this error and I think it's coming from this line of code in the multi_json gem but I'm not sleuthy enough to know why it's being triggered?!? Everything works fine in development and test but the deploy:assets:update_asset_mtimes task fails on cap deploy:migrations Any tips as to why this might be happening? multi_json has rev'd since last deploy so may try rolling back to previous version but would like to know why it's failing... Gory details: $ cap deploy:migrations ... * 2013