2016-10-16 5 views
0

(Odin 프로젝트의 일부로) railsbridge installfest을 수행 중이며 최종 단계에서 문제가 발생했습니다. "Deploy A Rails App. " 나는 터미널에서 예기치 않은 결과를 많이 얻고, 내가 튜토리얼의 끝에서 Heroku가 응용 프로그램의 웹 주소로 이동 할 때, 내가 얻을 :.응용 프로그램을 Heroku에 배포 할 때 오류가 발생했습니다. Railsbridge Installfest- 레일 응용 프로그램 배포

"당신이 찾고 있던 페이지가 존재하지 않습니다 에게 당신을 주소를 잘못 입력했거나 페이지가 이동했을 수 있습니다. 응용 프로그램 소유자는 로그에서 자세한 정보를 확인하십시오. "

저는 Windows 10에서 VM으로 우분투 16.04 LTS를 실행하고 있습니다. 온라인 (또는 오프라인)에서 자습서 작성 중에 test_app를 삭제하고 다시 시도해 보았습니다. VM을 끄고 시도했습니다. 다시 시작하기 전에 켜져 있지만 행운은 없습니다. 또한이 사이트에서 비슷한 문제가있는 사람들을 찾아 보았지만 이에 상응하는 오류 메시지를 찾을 수 없습니다.

이 문제가 나오기 전에 튜토리얼에서 레일 서버를 만들었습니다. 실제로 레일 서버를 만들어야한다고 말한 것처럼 정확하게 작동했습니다. 문제는 영웅에게 앱을 배포하려고했을 때만 시작되었습니다.

내가 수행 한 모든 단계가 포함되었습니다. 튜토리얼에 명시된 바와 같이 예상되는 명령 행 결과가 실제 결과와 다른 경우 불일치로 표시된 두 가지를 모두 포함했습니다. 예상대로 명령 줄 결과를 포함하지 않았습니다.이 질문은 이미 충분히 길어서 모든 것을 추가하지 않고도 충분합니다! 나를 도울 정보가 필요한 경우 저장 했으므로 알려주세요.

나는 분명히 뭔가를 놓친 경우 사과드립니다. 나는 입니다. 코딩을 처음 접한 사람은입니다.

나는 (터미널에서) 실행 :

git init 
git add -A 
git commit -m "initial commit" 
git log 
heroku create 

1 불일치 :

예상 코드 :

Enter your Heroku credentials. 
Email: [email protected] 
Password: 
Uploading ssh public key /Users/smei/.ssh/id_rsa.pub 
Creating floating-winter-18... done, stack is cedar 
http://floating-winter-18.heroku.com/ | [email protected]:floating-winter-18.git 
Git remote heroku added 

실제 코드 :

Creating app... done, ⬢ tranquil-beyond-97147 
https://tranquil-beyond-97147.herokuapp.com/ | https://git.heroku.com/tranquil-beyond-97147.git 

515,그러면 I는 (다시 단말기)

group :development, :test do 
    gem 'sqlite3' 
end 

group :production do 
    gem 'pg' 
end 

이어서

gem 'sqlite3' 

에서 ~/railsbridge/test_app/Gemfile의 라인을 변경 I 실행 :

gem install bundler 
bundle install --without production 

그럼 ~/railsbridge/test_app/config/routes.rb 줄에 Rails.application.routes 줄을 추가했습니다.어떻게 그리는 : (다시 터미널)에서 다음

root 'drinks#index' 

을 나는 실행 :

라인 추가

git add . 
git commit -m "Updates for heroku deployment" 
git push heroku master 

2 불일치 :

예상 번호 :

,273,210

실제 코드 :

Counting objects: 114, done. 
Delta compression using up to 2 threads. 
Compressing objects: 100% (100/100), done. 
Writing objects: 100% (114/114), 25.05 KiB | 0 bytes/s, done. 
Total 114 (delta 7), reused 0 (delta 0) 
remote: Compressing source files... done. 
remote: Building source: 
remote: 
remote: -----> Ruby app detected 
remote: -----> Compiling Ruby/Rails 
remote: -----> Using Ruby version: ruby-2.2.4 
remote: -----> Installing dependencies using bundler 1.11.2 
remote:  Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment 
remote:  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`. 
remote:  Fetching gem metadata from https://rubygems.org/.......... 
remote:  Fetching version metadata from https://rubygems.org/... 
remote:  Fetching dependency metadata from https://rubygems.org/.. 
remote:  Installing i18n 0.7.0 
remote:  Installing concurrent-ruby 1.0.2 
remote:  Installing rake 11.3.0 
remote:  Installing minitest 5.9.1 
remote:  Installing builder 3.2.2 
remote:  Installing thread_safe 0.3.5 
remote:  Installing mini_portile2 2.1.0 
remote:  Installing erubis 2.7.0 
remote:  Installing rack 2.0.1 
remote:  Installing nio4r 1.2.1 with native extensions 
remote:  Installing websocket-extensions 0.1.2 
remote:  Installing mime-types-data 3.2016.0521 
remote:  Installing arel 7.1.4 
remote:  Installing coffee-script-source 1.10.0 
remote:  Installing execjs 2.7.0 
remote:  Installing thor 0.19.1 
remote:  Installing multi_json 1.12.1 
remote:  Installing pg 0.19.0 with native extensions 
remote:  Installing method_source 0.8.2 
remote:  Installing puma 3.6.0 with native extensions 
remote:  Using bundler 1.11.2 
remote:  Installing sass 3.4.22 
remote:  Installing tilt 2.0.5 
remote:  Installing turbolinks-source 5.0.0 
remote:  Installing nokogiri 1.6.8.1 with native extensions 
remote:  Installing tzinfo 1.2.2 
remote:  Installing websocket-driver 0.6.4 with native extensions 
remote:  Installing rack-test 0.6.3 
remote:  Installing sprockets 3.7.0 
remote:  Installing mime-types 3.1 
remote:  Installing coffee-script 2.4.1 
remote:  Installing uglifier 3.0.2 
remote:  Installing turbolinks 5.0.1 
remote:  Installing activesupport 5.0.0.1 
remote:  Installing mail 2.6.4 
remote:  Installing globalid 0.3.7 
remote:  Installing activemodel 5.0.0.1 
remote:  Installing jbuilder 2.6.0 
remote:  Installing activejob 5.0.0.1 
remote:  Installing activerecord 5.0.0.1 
remote:  Installing loofah 2.0.3 
remote:  Installing rails-html-sanitizer 1.0.3 
remote:  Installing rails-dom-testing 2.0.1 
remote:  Installing actionview 5.0.0.1 
remote:  Installing actionpack 5.0.0.1 
remote:  Installing actionmailer 5.0.0.1 
remote:  Installing actioncable 5.0.0.1 
remote:  Installing railties 5.0.0.1 
remote:  Installing sprockets-rails 3.2.0 
remote:  Installing coffee-rails 4.2.1 
remote:  Installing rails 5.0.0.1 
remote:  Installing jquery-rails 4.2.1 
remote:  Installing sass-rails 5.0.6 
remote:  Bundle complete! 16 Gemfile dependencies, 53 gems now installed. 
remote:  Gems in the groups development and test were not installed. 
remote:  Bundled gems are installed into ./vendor/bundle. 
remote:  Bundle completed (25.91s) 
remote:  Cleaning up the bundler cache. 
remote: -----> Preparing app for Rails asset pipeline 
remote:  Running: rake assets:precompile 
remote:  I, [2016-10-16T22:14:51.182054 #1022] INFO -- : Writing /tmp/build_eaa9178115288d749f254409ffd66e9f/public/assets/application-ea005870b2299ed0464e134ab4079aa8856885e9ffd3d81e60417322f2fa0a97.js 
remote:  I, [2016-10-16T22:14:51.202261 #1022] INFO -- : Writing /tmp/build_eaa9178115288d749f254409ffd66e9f/public/assets/application-ea005870b2299ed0464e134ab4079aa8856885e9ffd3d81e60417322f2fa0a97.js.gz 
remote:  I, [2016-10-16T22:14:51.252933 #1022] INFO -- : Writing /tmp/build_eaa9178115288d749f254409ffd66e9f/public/assets/application-d12397cbc3a266ce5a99f7b588223090c55ca04a439953bb5f9304395de93fc3.css 
remote:  I, [2016-10-16T22:14:51.253116 #1022] INFO -- : Writing /tmp/build_eaa9178115288d749f254409ffd66e9f/public/assets/application-d12397cbc3a266ce5a99f7b588223090c55ca04a439953bb5f9304395de93fc3.css.gz 
remote:  Asset precompilation completed (3.83s) 
remote:  Cleaning assets 
remote:  Running: rake assets:clean 
remote: 
remote: ###### WARNING: 
remote:  You have not declared a Ruby version in your Gemfile. 
remote:  To set your Ruby version add this line to your Gemfile: 
remote:  ruby '2.2.4' 
remote:  # See https://devcenter.heroku.com/articles/ruby-versions for more information. 
remote: 
remote: ###### WARNING: 
remote:  No Procfile detected, using the default web server. 
remote:  We recommend explicitly declaring how to boot your server process via a Procfile. 
remote:  https://devcenter.heroku.com/articles/ruby-default-web-server 
remote: 
remote: -----> Discovering process types 
remote:  Procfile declares types  -> (none) 
remote:  Default types for buildpack -> console, rake, web, worker 
remote: 
remote: -----> Compressing... 
remote:  Done: 27.9M 
remote: -----> Launching... 
remote:  Released v5 
remote:  https://tranquil-beyond-97147.herokuapp.com/ deployed to Heroku 
remote: 
remote: Verifying deploy... done. 
To https://git.heroku.com/tranquil-beyond-97147.git 
* [new branch]  master -> master 

그리고 마지막으로, 내가 입력

heroku run rake db:migrate 

3 불일치 :

예상 번호 :

Migrating to CreateDrinks (20160706063236) 
== 20160706063236 CreateDrinks: migrating ===================================== 
-- create_table(:drinks) 
    -> 0.0084s 
== 20160706063236 CreateDrinks: migrated (0.0085s) ============================ 
당신이 제공 할 수있는 모든 도움에 미리 너무 많이 나는 가능한 한이 명확했습니다 희망

Running rake db:migrate on ⬢ tranquil-beyond-97147... up, run.1313 (Free) 
D, [2016-10-16T22:16:19.568857 #3] DEBUG -- : (12.1ms) CREATE TABLE "schema_migrations" ("version" character varying PRIMARY KEY) 
D, [2016-10-16T22:16:19.582446 #3] DEBUG -- : (7.5ms) CREATE TABLE "ar_internal_metadata" ("key" character varying PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
D, [2016-10-16T22:16:19.586398 #3] DEBUG -- : (1.8ms) SELECT pg_try_advisory_lock(4170385879066863015); 
D, [2016-10-16T22:16:19.598567 #3] DEBUG -- : ActiveRecord::SchemaMigration Load (1.9ms) SELECT "schema_migrations".* FROM "schema_migrations" 
I, [2016-10-16T22:16:19.604863 #3] INFO -- : Migrating to CreateDrinks (20161016221052) 
D, [2016-10-16T22:16:19.607807 #3] DEBUG -- : (1.8ms) BEGIN 
== 20161016221052 CreateDrinks: migrating ===================================== 
-- create_table(:drinks) 
D, [2016-10-16T22:16:19.615754 #3] DEBUG -- : (7.0ms) CREATE TABLE "drinks" ("id" serial primary key, "name" character varying, "temperature" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
    -> 0.0078s 
== 20161016221052 CreateDrinks: migrated (0.0079s) ============================ 

D, [2016-10-16T22:16:19.623202 #3] DEBUG -- : SQL (1.9ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20161016221052"]] 
D, [2016-10-16T22:16:19.627228 #3] DEBUG -- : (3.8ms) COMMIT 
D, [2016-10-16T22:16:19.637096 #3] DEBUG -- : ActiveRecord::InternalMetadata Load (1.8ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", :environment], ["LIMIT", 1]] 
D, [2016-10-16T22:16:19.644393 #3] DEBUG -- : (1.6ms) BEGIN 
D, [2016-10-16T22:16:19.647314 #3] DEBUG -- : SQL (1.9ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "production"], ["created_at", 2016-10-16 22:16:19 UTC], ["updated_at", 2016-10-16 22:16:19 UTC]] 
D, [2016-10-16T22:16:19.649903 #3] DEBUG -- : (2.4ms) COMMIT 
D, [2016-10-16T22:16:19.651778 #3] DEBUG -- : (1.7ms) SELECT pg_advisory_unlock(4170385879066863015) 

, 감사 :

실제 코드입니다.

답변

0

내가 Heroku가 당신을 위해 만든 응용 프로그램의 이름이기 때문에 tranquil-beyond-97147.herokuapp.com을 확인해야한다고 말하고 싶습니다. 통과하지 않는 경우 heroku logs을 실행하고 내용을 붙여 넣어야합니다. 오류의 원인은 항상 로그에 있습니다.

+0

이상한 점은 배포 후 사이트를 확인했지만 오류 메시지가 나타납니다. 그러나 tranquil-beyond-97147.herokuapp.com이 올바르게 작동하는 것 같습니다. – adc17

+0

내가 지금 가지고있는 "###### 경고"및 "디버그"결과를 모두 안전하게 무시할 수 있습니까? 당신의 도움을 주셔서 감사합니다. – adc17

+0

예, 가능합니다. 'DEBUG'은 정상이며, 로깅 수준에 따라 실제로 Rails 로그에 표시됩니다. – oreoluwa

관련 문제