2016-10-20 2 views
0

heroku에서 프로젝트를 배포하고 있는데 "assets"폴더에있는 파일을 찾지 못해서 문제가 있습니다. 다른 파일에서이 파일을 폴더에 구성하려고합니다. 설정 :Heroku 및 Ruby on rails (파일을 찾을 수 없음)

config.serve_static_files = true 

하지만이 Heroku가의 빌드 로그입니다 ... 작동하지 않습니다 :

-----> Ruby app detected 
-----> Compiling Ruby/Rails 
-----> Using Ruby version: ruby-2.2.4 
-----> Installing dependencies using bundler 1.11.2 
     Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment 
     Warning: the running version of Bundler is older than the version that created the lockfile. We suggest you upgrade to the latest version of Bundler by running `gem install bundler`. 
     Using rake 11.2.2 
     Using i18n 0.7.0 
     Using json 1.8.3 
     Using minitest 5.9.0 
     Using thread_safe 0.3.5 
     Using builder 3.2.2 
     Using erubis 2.7.0 
     Using mini_portile2 2.1.0 
     Using pkg-config 1.1.7 
     Using rack 1.6.4 
     Using mime-types-data 3.2016.0521 
     Using active_skin 0.0.12 
     Using sass 3.4.22 
     Using thor 0.19.1 
     Using coffee-script-source 1.10.0 
     Using execjs 2.7.0 
     Using formtastic_i18n 0.6.0 
     Using arel 6.0.3 
     Using concurrent-ruby 1.0.2 
     Using tilt 2.0.5 
     Using bcrypt 3.1.11 
     Using orm_adapter 0.5.0 
     Using multi_json 1.12.1 
     Using mimemagic 0.3.2 
     Using pg 0.18.4 
     Using bundler 1.11.2 
     Using turbolinks-source 5.0.0 
     Using rdoc 4.2.2 
     Using tzinfo 1.2.2 
     Using rack-test 0.6.3 
     Using warden 1.2.6 
     Using mime-types 3.1 
     Using nokogiri 1.6.8 
     Using bourbon 4.2.7 
     Using coffee-script 2.4.1 
     Using uglifier 3.0.2 
     Using sprockets 3.7.0 
     Using turbolinks 5.0.1 
     Using activesupport 4.2.5 
     Using sdoc 0.4.1 
     Using mail 2.6.4 
     Using loofah 2.0.3 
     Using rails-deprecated_sanitizer 1.0.3 
     Using globalid 0.3.7 
     Using arbre 1.1.1 
     Using activemodel 4.2.5 
     Using climate_control 0.0.3 
     Using jbuilder 2.6.0 
     Using rails-html-sanitizer 1.0.3 
     Using rails-dom-testing 1.0.7 
     Using activejob 4.2.5 
     Using activerecord 4.2.5 
     Using cocaine 0.5.8 
     Using actionview 4.2.5 
     Using actionpack 4.2.5 
     Using paperclip 5.1.0 
     Using polyamorous 1.3.1 
     Using actionmailer 4.2.5 
     Using railties 4.2.5 
     Using formtastic 3.1.4 
     Using has_scope 0.6.0 
     Using kaminari 0.17.0 
     Using sprockets-rails 3.2.0 
     Using ransack 1.8.2 
     Using coffee-rails 4.1.1 
     Using responders 2.3.0 
     Using jquery-rails 4.2.1 
     Using jquery-ui-rails 5.0.5 
     Using sass-rails 5.0.6 
     Using rails 4.2.5 
     Using inherited_resources 1.6.0 
     Using devise 4.2.0 
     Using activeadmin 1.0.0.pre4 from git://github.com/activeadmin/activeadmin.git (at [email protected]) 
     Bundle complete! 16 Gemfile dependencies, 73 gems now installed. 
     Gems in the groups development and test were not installed. 
     Bundled gems are installed into ./vendor/bundle. 
     Bundle completed (0.53s) 
     Cleaning up the bundler cache. 
     Warning: the running version of Bundler is older than the version that created the lockfile. We suggest you upgrade to the latest version of Bundler by running `gem install bundler`. 
-----> Preparing app for Rails asset pipeline 
     Running: rake assets:precompile 
     Asset precompilation completed (2.53s) 
     Cleaning assets 
     Running: rake assets:clean 
###### WARNING: 
     Include 'rails_12factor' gem to enable all platform features 
     See https://devcenter.heroku.com/articles/rails-integration-gems for more information. 
###### WARNING: 
     You have not declared a Ruby version in your Gemfile. 
     To set your Ruby version add this line to your Gemfile: 
     ruby '2.2.4' 
     # See https://devcenter.heroku.com/articles/ruby-versions for more information. 
###### WARNING: 
     No Procfile detected, using the default web server. 
     We recommend explicitly declaring how to boot your server process via a Procfile. 
     https://devcenter.heroku.com/articles/ruby-default-web-server 
-----> Discovering process types 
     Procfile declares types  -> (none) 
     Default types for buildpack -> console, rake, web, worker 
-----> Compressing... 
     Done: 40M 
-----> Launching... 
     Released v26 
     https://ligadelagua.herokuapp.com/ deployed to Heroku 

이 웹 브라우저의 콘솔의 이미지가

어떤 도움 814,313,210

들으 :)

답변

0

첫째로, 당신의 Gemfile에 gem "rails_12factor"을 포함하는 것이 좋습니다.

다음, Heroku가에 배포하기 전에 자산을 컴파일하려고 :

RAILS_ENV=production rake assets:precompile