昨天我試圖將我的導軌應用程序部署到我自己的服務器上。對於部署,我已經遵循Gorails教程 - >https://gorails.com/deploy/ubuntu/14.04。部署後,最後我的Rails應用程序已經運行。但我有一個問題,當我嘗試創建與圖像室模塊中,我得到的錯誤是這樣使用capistrano導軌部署後出現錯誤(上傳圖片)4
We're sorry, but something went wrong.
如果我沒有圖像創造空間,它的成功。我確定我無法上傳圖片。
gem 'paperclip'
room.rb
has_attached_file :image, :styles => { :for_index => "336x227>", :thumb => "150x150>" }, :default_url => "/images/:style/missing.png"
validates_attachment_content_type :image, :content_type => /\Aimage\/.*\Z/
deploy.rb
lock '3.1.0'
set :application, 'hotelxxxxx'
set :repo_url, '[email protected]:xxxxxx/hotelxxxxx.git'
set :deploy_to, '/home/xxxxxx/hotelxxxxx'
set :linked_files, %w{config/database.yml}
set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}
namespace :deploy do
desc 'Restart application'
task :restart do
on roles(:app), in: :sequence, wait: 5 do
execute :touch, release_path.join('tmp/restart.txt')
end
end
after :publishing, 'deploy:restart'
after :finishing, 'deploy:cleanup'
end
如何解決呢?
我登錄到我的服務器和我的文件夾rails應用程序。打開日誌/ production.log,但它是空的 – Sakti