xiazhaoyang

Joined

880 Experience
0 Lessons Completed
1 Question Solved

Activity

Hi Chris, which version of rails did you use in your tutorial? Did you test with Rails 5.2.1.1 ?

I have fixed the problems, it was because Rails 5.2.1.1 was not compatible with Capistrano 3.0. It workd after I downgraded the Rails 5.2.1.1 to Rails 5.2.0.

I use Rails 5.2.1.1, is it a good version for deployment?

when I ran

git mv config/secrets.yml config/secrets.yml.example
git mv config/database.yml config/database.yml.example
git commit -m "Only store example secrets and database configs
cp config/secrets.yml.example config/secrets.yml
cp config/database.yml.example config/database.ym

i got:

fatal: bad source, source=config/secrets.yml, destination=config/secrets.yml.example
fatal: not under version control, source=config/database.yml, destination=config/database.yml.example
cp: config/secrets.yml.example: No such file or directory

Hi Chris

In your video, I didn't see you mention about the ideal ruby version and rails version for local computer, should they has the similar version as the server's? Is there anything I should pay attention to?

Thanks

Sam

I will try to deploy my app again tomorrow, hope I can make it~~

I think you should comment that line, beginner like me sometimes will confuse about the same style between command and comment ( or output ).

I'm confused by this line : linked file /home/deploy/build.gorails.com/shared/config/database.yml does not exist on IP_ADDRESS in your tutorial. Should I run on my server or local for this line?

Exactly the same as you except "require 'whenever/capistrano" , I didn't have this line in my file.

The website stop me from submitting the error message, for security?

cap aborted!
NoMethodError: undefined method `stages' for Capistrano::DSL:Module
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/capistrano-bundler-1.4.0/lib/capistrano/tasks/bundler.cap:69:in `<top (required)>'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/capistrano-bundler-1.4.0/lib/capistrano/bundler/tasks.rb:1:in `load'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/capistrano-bundler-1.4.0/lib/capistrano/bundler/tasks.rb:1:in `<top (required)>'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/capistrano-bundler-1.4.0/lib/capistrano/bundler.rb:1:in `require_relative'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/capistrano-bundler-1.4.0/lib/capistrano/bundler.rb:1:in `<top (required)>'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/capistrano-rails-1.4.0/lib/capistrano/rails.rb:1:in `<top (required)>'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `require'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:39:in `require'
/Users/sammbr/code/xiazhaoyang/deploybwg/Capfile:1:in `<top (required)>'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/rake_module.rb:29:in `load'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/rake_module.rb:29:in `load_rakefile'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:703:in `raw_load_rakefile'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:104:in `block in load_rakefile'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:186:in `standard_exception_handling'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:103:in `load_rakefile'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:82:in `block in run'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:186:in `standard_exception_handling'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:80:in `run'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/capistrano-3.11.0/lib/capistrano/application.rb:14:in `run'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/capistrano-3.11.0/bin/cap:3:in `<top (required)>'
/Users/sammbr/.rbenv/versions/2.5.1/bin/cap:23:in `load'
/Users/sammbr/.rbenv/versions/2.5.1/bin/cap:23:in `<main>'

Caused by:
LoadError: cannot load such file -- capistrano/rails
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/Users/sammbr/code/xiazhaoyang/deploybwg/Capfile:1:in `<top (required)>'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/rake_module.rb:29:in `load'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/rake_module.rb:29:in `load_rakefile'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:703:in `raw_load_rakefile'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:104:in `block in load_rakefile'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:186:in `standard_exception_handling'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:103:in `load_rakefile'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:82:in `block in run'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:186:in `standard_exception_handling'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:80:in `run'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/capistrano-3.11.0/lib/capistrano/application.rb:14:in `run'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/capistrano-3.11.0/bin/cap:3:in `<top (required)>'
/Users/sammbr/.rbenv/versions/2.5.1/bin/cap:23:in `load'
/Users/sammbr/.rbenv/versions/2.5.1/bin/cap:23:in `<main>'

cap aborted!
NoMethodError: undefined method stages' for Capistrano::DSL:Module
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/capistrano-bundler-1.4.0/lib/capistrano/tasks/bundler.cap:69:in
'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/capistrano-bundler-1.4.0/lib/capistrano/bundler/tasks.rb:1:in load'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/capistrano-bundler-1.4.0/lib/capistrano/bundler/tasks.rb:1:in
'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/capistrano-bundler-1.4.0/lib/capistrano/bundler.rb:1:in require_relative'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/capistrano-bundler-1.4.0/lib/capistrano/bundler.rb:1:in
'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in require'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in
require'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/capistrano-rails-1.4.0/lib/capistrano/rails.rb:1:in <top (required)>'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in
require'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in rescue in require'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:39:in
require'
/Users/sammbr/code/xiazhaoyang/deploybwg/Capfile:1:in <top (required)>'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/rake_module.rb:29:in
load'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/rake_module.rb:29:in load_rakefile'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:703:in
raw_load_rakefile'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:104:in block in load_rakefile'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:186:in
standard_exception_handling'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:103:in load_rakefile'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:82:in
block in run'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:186:in standard_exception_handling'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:80:in
run'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/capistrano-3.11.0/lib/capistrano/application.rb:14:in run'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/capistrano-3.11.0/bin/cap:3:in
'
/Users/sammbr/.rbenv/versions/2.5.1/bin/cap:23:in load'
/Users/sammbr/.rbenv/versions/2.5.1/bin/cap:23:in
'

Caused by:
LoadError: cannot load such file -- capistrano/rails
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in require'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in
require'
/Users/sammbr/code/xiazhaoyang/deploybwg/Capfile:1:in <top (required)>'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/rake_module.rb:29:in
load'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/rake_module.rb:29:in load_rakefile'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:703:in
raw_load_rakefile'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:104:in block in load_rakefile'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:186:in
standard_exception_handling'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:103:in load_rakefile'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:82:in
block in run'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:186:in standard_exception_handling'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:80:in
run'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/capistrano-3.11.0/lib/capistrano/application.rb:14:in run'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/capistrano-3.11.0/bin/cap:3:in
'
/Users/sammbr/.rbenv/versions/2.5.1/bin/cap:23:in load'
/Users/sammbr/.rbenv/versions/2.5.1/bin/cap:23:in
'

cap aborted!
NoMethodError: undefined method `stages' for Capistrano::DSL:Module
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/capistrano-bundler-1.4.0/lib/capistrano/tasks/bundler.cap:69:in `<top (required)>'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/capistrano-bundler-1.4.0/lib/capistrano/bundler/tasks.rb:1:in `load'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/capistrano-bundler-1.4.0/lib/capistrano/bundler/tasks.rb:1:in `<top (required)>'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/capistrano-bundler-1.4.0/lib/capistrano/bundler.rb:1:in `require_relative'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/capistrano-bundler-1.4.0/lib/capistrano/bundler.rb:1:in `<top (required)>'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/capistrano-rails-1.4.0/lib/capistrano/rails.rb:1:in `<top (required)>'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `require'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:39:in `require'
/Users/sammbr/code/xiazhaoyang/deploybwg/Capfile:1:in `<top (required)>'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/rake_module.rb:29:in `load'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/rake_module.rb:29:in `load_rakefile'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:703:in `raw_load_rakefile'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:104:in `block in load_rakefile'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:186:in `standard_exception_handling'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:103:in `load_rakefile'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:82:in `block in run'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:186:in `standard_exception_handling'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:80:in `run'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/capistrano-3.11.0/lib/capistrano/application.rb:14:in `run'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/capistrano-3.11.0/bin/cap:3:in `<top (required)>'
/Users/sammbr/.rbenv/versions/2.5.1/bin/cap:23:in `load'
/Users/sammbr/.rbenv/versions/2.5.1/bin/cap:23:in `<main>'

Caused by:
LoadError: cannot load such file -- capistrano/rails
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/Users/sammbr/code/xiazhaoyang/deploybwg/Capfile:1:in `<top (required)>'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/rake_module.rb:29:in `load'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/rake_module.rb:29:in `load_rakefile'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:703:in `raw_load_rakefile'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:104:in `block in load_rakefile'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:186:in `standard_exception_handling'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:103:in `load_rakefile'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:82:in `block in run'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:186:in `standard_exception_handling'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:80:in `run'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/capistrano-3.11.0/lib/capistrano/application.rb:14:in `run'
/Users/sammbr/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/capistrano-3.11.0/bin/cap:3:in `<top (required)>'
/Users/sammbr/.rbenv/versions/2.5.1/bin/cap:23:in `load'
/Users/sammbr/.rbenv/versions/2.5.1/bin/cap:23:in `<main>'

Hi Chris,

Thank you for your reply, I found a potential problem, the ruby version on my Mac is 2.5.1, the Ruby 2.5.3 was installed on my server, did this cause the problem?

Thanks

Sam

I spent 2 days followed "Deploy Ruby On Rails onUbuntu 18.04 Bionic Beaver" , tried to deploy my rails project, now i'm out of my mind! I have repeated whole process for more than 4 times, always got problem at "Capistrano Setup" section, I ran cap production deploy, got the error below:

(Backtrace restricted to imported tasks)
cap aborted!
NoMethodError: undefined method `stages' for Capistrano::DSL:Module

Anyone know what happend?

Thanks

Sam

logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2020 GoRails, LLC. All rights reserved.