部署 ROR 部署在 heroku 上面 index 的问题

Tag · December 12, 2012 · Last by Tag replied at December 12, 2012 · 2500 hits

我本地/public/index.html 文件时被我删除了的, 但是我部署到 heroku 上结果请求 这个页面还在?

我的步骤如下。。

hack@localhost ~: cd projectList/test hack@localhost ~: heroku create myusertest hack@localhost ~: git add . hack@localhost ~: git commit -m 'first commit' hack@localhost ~: git push heroku master ... ..... .......这个这里报了个 sqlite 的错误解决办法 1、Gemfile 文件修改 gem sqlite3 为:

gem 'sqlite3', :group => [:development, :test] group :production do gem 'thin' gem 'pg' end

2、删除掉 gemfile.lock 文件 3、运行 bundle install --without production 4、运行 git add . 5、运行 git commit -m "bundle updating sqlite3" 6、运行 git push heroku master

开始不知道哪里有问题 反复的重新操作了很多次,,最后成功了 git add . git commit -m 'bundle updating sqlite3' git push heroku master

然后浏览首页 出现 index 的内容... 我在 routes 里面打开了 root :tp "index#index"

public 的静态页面也删了的,,为啥还出现这个?

在文件系统删掉了但没有从版本控制删掉?

git rm public/index.html
git commit -m'remove index'

还有一种可能是 branch 捣弄到 master 外了

@luikore 谢了,,就是这种情况。囧,,,我忘记 git rm 而直接用的 rm

You need to Sign in before reply, if you don't have an account, please Sign up first.