@ this를 보아 주셔서 감사합니다. 제가 믿는 비교적 간단한 문제입니다. 조금만 기다리면 모든 설정에 대해 알아야하고 Heroku로 푸시해야 할 정보가 있습니다. 본 가이드를 따르고 있습니다. http://docs.railsbridge.org/intro-to-rails/deploying_to_heroku. 내가 Heroku가에 밀어하려고 할 때 발생레일 4 - Heroku 문제로 푸시
To [email protected]:polar-thicket-3762.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:polar-thicket-3762.git'
:
는이 오류가 있습니다. 자산을 미리 컴파일하려고합니다. 솔루션은 내 application.rb에이 행을 추가해야만 성공적으로 시도했음을 알 수 있습니다.
ruby config.assets.initialize_on_precompile = false
그것은 성공적으로 밀어 않지만, 내가 그 명령을 실행하려고하면 그때는 그런
heroku run rake db:migrate
를 통해 데이터베이스를 컴파일되지 않습니다, 그것은 갈퀴 DB를 실행하지 않습니다 말한다 :에 이전 thread .3309 "ruby"가 발견되지 않기 때문에. 나는 그것 앞에서 루비를 제거하려고 노력했다. 그리고 나서 그것은 영웅에게 밀리지 않을 것이다.
어떻게하면 이것을 Heroku로 푸시하고 DB를 컴파일 할 수 있습니까? 감사합니다.
몇 가지를 아는 것이 도움이 될 것입니다. 개발 목적으로 Nitrous.io와 Sqlite3을 사용하고 있습니다. 내 application.rb은
require File.expand_path('../boot', __FILE__)
require 'rails/all'
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
module RailsBase
class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
config.time_zone = 'Central Time (US & Canada)'
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
# To push to Heroku
config.assets.initialize_on_precompile = false
end
end
APPLICATION.RB 등 (도 database.yml을 & gemfile 아래에 나열되어 있습니다) database.yml을 같은 ------------- ----------------------------------------------
# SQLite version 3.x
# gem install sqlite3
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
#
default: &default
adapter: sqlite3
pool: 5
timeout: 5000
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: sqlite3
database: db/test.sqlite3
pool: 5
timeout: 5000
production:
<<: *default
database: db/production.sqlite3
GEMFILE ---------------------------------------------- ------------
source 'https://rubygems.org'
ruby "2.0.0"
gem 'rails', '4.1.6'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
gem 'jquery-rails'
gem 'bootstrap-sass', '~> 3.2'
gem 'puma'
gem 'thin'
gem 'bcrypt'
gem 'rmagick'
gem 'carrierwave' #to handle image uploads
# Push to heroku
# Look @ this site below for more instructions and look @ section "each time"
# http://docs.railsbridge.org/intro-to-rails/deploying_to_heroku
group :development, :test do
gem 'byebug'
gem 'sqlite3'
end
# Add for Heroku deployment to "production" which in my case is stage
group :production do
gem 'pg'
gem 'rails_12factor'
end
# Use Uglifier as compressor for JavaScript assets
# gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
# gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring', group: :development
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
Ok, git status 깨끗합니다. 또한 내 앱 위치는 repo의 루트이고 master 브랜치입니다. application.rb는 어떻습니까?이 명령을 올바르게 입력 했습니까? – camdixon