Rails部署:bin / webpack:权限被拒绝

时间:2018-03-01 08:00:55

标签: ruby-on-rails ruby webpack capistrano

我在我的开发机器中创建了ROR应用程序(Ruby 2.3.3,Rails 5.1.5)。

这是我的Gemfile

gem 'rails', '~> 5.1.4'
gem "pg", "~> 0.18"
gem 'puma', '~> 3.7'
gem 'devise'
gem 'devise-i18n'
gem 'activeadmin'
gem 'inherited_resources'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'webpacker'
gem 'react_on_rails', '10.0.2'
gem 'coffee-rails', '~> 4.2'
gem 'turbolinks', '~> 5'
gem 'jbuilder', '~> 2.5'
gem 'bcrypt', platforms: [:ruby]
gem 'carrierwave', '~> 0.11.2'

group :development, :test do
  gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end


group :development do
  gem 'web-console', '>= 3.3.0'

  gem 'capistrano', '~> 3.7', '>= 3.7.1'
  gem 'capistrano-rails', '~> 1.2'
  gem 'capistrano-passenger', '~> 0.2.0'

  gem 'capistrano-rvm'
end

gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

在使用Capistrano部署到远程服务器后,我遇到以下“权限被拒绝”错误

 01 /usr/local/rvm/bin/rvm default do bundle exec rake assets:precompile
 01 ReactOnRails: Set generated_assets_dir to default: public/webpack/production
 01
 01
 cd /root/aviation_app/releases/20180301070300 && RAILS_ENV=production bin/webpack 01 01 sh: 1: 

01 bin/webpack: Permission denied

01 01 rake aborted!

01 Command failed with status (126): [cd /root/aviation_app/releases/20180301070...] 
01 /root/aviation_app/shared/bundle/ruby/2.3.0/gems/react_on_rails-10.0.2/lib/tasks/assets.rake:64:in `block (… 
01 /root/aviation_app/shared/bundle/ruby/2.3.0/gems/rake-12.3.0/exe/rake:27:in `<top (required)>' 
01 /usr/local/rvm/gems/ruby-2.3.3/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:75:in `load' 
01 /usr/local/rvm/gems/ruby-2.3.3/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:75:in `kernel_load'
 01 /usr/local/rvm/gems/ruby-2.3.3/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:28:in `run' 
01 /usr/local/rvm/gems/ruby-2.3.3/gems/bundler-1.16.1/lib/bundler/cli.rb:424:in `exec'
 01 /usr/local/rvm/gems/ruby-2.3.3/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
 01 /usr/local/rvm/gems/ruby-2.3.3/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `i… 
01 /usr/local/rvm/gems/ruby-2.3.3/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch' 
01 /usr/local/rvm/gems/ruby-2.3.3/gems/bundler-1.16.1/lib/bundler/cli.rb:27:in `dispatch' 
01 /usr/local/rvm/gems/ruby-2.3.3/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start' 
01 /usr/local/rvm/gems/ruby-2.3.3/gems/bundler-1.16.1/lib/bundler/cli.rb:18:in `start' 01 /usr/local/rvm/gems/ruby-2.3.3/gems/bundler-1.16.1/exe/bundle:30:in `block in <top (required)>' 01 /usr/local/rvm/gems/ruby-2.3.3/gems/bundler-1.16.1/lib/bundler/friendly_errors.rb:122:in `with_friendly_err… 01 /usr/local/rvm/gems/ruby-2.3.3/gems/bundler-1.16.1/exe/bu

有人可以帮助我吗? 感谢

0 个答案:

没有答案