小编Oli*_*can的帖子

如何只将我的git仓库的子目录部署/推送到Heroku?

我有一个使用Serve的项目,并使用Gi​​t进行版本控制.Serve创建一个output包含我想要部署到Heroku的静态文件的文件夹.

我不想部署Serve项目本身,因为Heroku Cedar堆栈似乎不太喜欢它,但最重要的是我想利用Heroku对静态网站的大力支持.

有没有办法将子文件夹部署到git远程?我应该在output文件夹中创建一个Git仓库(听起来不对)并将其推送到Heroku?

git heroku

111
推荐指数
3
解决办法
3万
查看次数

Heroku上的#<Rails :: Application :: Configuration的未定义方法`sass'

我看了一下,没有发现类似的错误.我不记得曾修改我的production.rb.好的方面,这是我的application.rb

这是来自Heroku的堆栈跟踪.

$ heroku run rake db:migrate --remote staging --trace

Running rake db:migrate --trace attached to terminal... up, run.2
/app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.4/lib/rack/backports/uri/common_192.rb:53:      warning: already initialized constant WFKV_
rake aborted!

undefined method `sass' for #<Rails::Application::Configuration:0x000000047c6fb0>
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.1/lib/rails/railtie/configuration.rb:78:in `method_missing'
/app/config/application.rb:63:in `<class:Application>'
/app/config/application.rb:18:in `<module:Instantice>'
/app/config/application.rb:17:in `<top (required)>'
/app/Rakefile:5:in `require'
/app/Rakefile:5:in `<top (required)>'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2/lib/rake/rake_module.rb:25:in `load'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2/lib/rake/rake_module.rb:25:in `load_rakefile'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:495:in `raw_load_rakefile'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:78:in `block in load_rakefile'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:77:in `load_rakefile'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:61:in `block in run'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2/bin/rake:32:in `<top (required)>'
/app/vendor/bundle/ruby/1.9.1/bin/rake:19:in `load'
/app/vendor/bundle/ruby/1.9.1/bin/rake:19:in `<main>'
Run Code Online (Sandbox Code Playgroud)

我最初认为这条线application.rb …

rake sass heroku ruby-on-rails-3.1

20
推荐指数
2
解决办法
5500
查看次数

忽略postgresql的.travis.yml版本设置

以下是我的.travis.yml:

addons:
  postgresql: "9.3"
before_script:
  - psql --version
  - psql -c 'SELECT version();' -U postgres
Run Code Online (Sandbox Code Playgroud)

我得到以下输出:

$ psql --version
$ psql (PostgreSQL) 9.4.0
$ psql -c 'SELECT version();' -U postgres

PostgreSQL 9.1.14 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3, 64-bit
Run Code Online (Sandbox Code Playgroud)

显然这里有问题,但我不知道如何告诉Travis实际使用我指定的postgres版本.我按照Travis Docs的说明进行操作.这似乎是一个错误.

这是一个问题,因为我使用新的json列类型,因此收到以下错误:

PG::UndefinedObject: ERROR:  type "json" does not exist
Run Code Online (Sandbox Code Playgroud)

travis-ci

5
推荐指数
1
解决办法
736
查看次数

标签 统计

heroku ×2

git ×1

rake ×1

ruby-on-rails-3.1 ×1

sass ×1

travis-ci ×1