This is my first time using Octopress, although I've deployed multiple rails apps to heroku. Whatever I do, I unable to deploy my Octopress app to heroku. When I do, all I get is a blank page.
What I did was:
git clone git://github.com/imathis/octopress.git
cd octopress
bundle install
rake install
rake preview # working on localhost
heroku create
git add .
git commit -m "yo"
git push heroku master
heroku open
But it always shows a blank page. I'm obviously missing something very stupid. Any help would be appreciated.
I had the same problem. You will need to push at least one blog post. Once you have your first post, your blog will come up instead of the blank page. When you add more posts and/or modify existing ones don't forget to use "rake generate" (like I forgot and then did not understand why the posts on Heroku don't update).
Related
I updated a pre-existing vuepress documentation, which runs and works as expected when delopyed on localhost:8080/, however once I push the updates to gh hub pages it does not display correctly.
code i use to deploy:
set -e
npm run docs:build
cd docs/.vuepress/dist
git init
git add -A
git commit -m "Deploy documentation"
git push-f git#github.com:NAME/REPO.git master:gh-pages
I have no error messages durning run time or deploy.
But when I check the actual documentation on github, it displays funny. and the links do not work.... as when I check the pages dev eniroment on the console 404 errors appear... it seems that there might be something wrong with the dist.js files in assets....
Not sure how to fix this...please help. Thx!
Images 1: Displays black blocks
Images 2 Error in the dev console
(I have no errors messages durning build only in the console)
I think you may want to double-check if you have set the base correctly.
Check out the documentation site about deploy to GitHub pages and Config Reference -> base
If this doesn't solve your problem, can you post more detail about your code? Or maybe a repo?
I have a Sinatra app, hosted on Heroku. Lately, I've been developing that same app from a different folder. It's not a branch, it's just a parallel app / directory with identical contents but different code. I want to push this new app to Heroku, overwriting the app that's currently there. I don't want to merge the two locally, just continue from the new one while keeping the old. What's the proper command sequence for this? I have doubts about running heroku create, as that will result in a new app. Thanks!
Firstly this is certainly possible. The process is quite simple, firstly we need to add Heroku as a new remote repository to your new app.
heroku git:remote -a project
You would replace the 'project' with your Heroku app name. Secondly you would need to force a push to Heroku.
git push -f heroku master
Note: We are using an '-f' to force the push.
I'm working on Mac OSX (10.6.8), and I've just installed the Heroku toolbelt, with hopes of trying to mess around making facebook apps. I've created a facebook app and according to Heroku's instructions, I should just be able to edit it by entering this into my command line:
git clone git#heroku.com:false-title-1234.git -o heroku
The Heroku Toolbelt is installed and I am logged in. But when I run the command above I get this error:
-bash: git: command not found
I didn't have git before, and apparently I still do not have it. But I thought it came as part of the Heroku toolbelt? It seems like, for everyone else on the internet, the git part of it "just works," because I'm not able to find references to problems with the git component of the heroku toolbelt. Any ideas as to what I'm doing wrong?
Just install git on your own. Heroku-toolbelt may or may not come with git, but installing git by itself is a relatively simple task.
Here are some instructions for installing git on OSX: https://help.github.com/articles/set-up-git
Gollum is "A simple, Git-powered wiki with a sweet API and local frontend."
It's hosted on GitHub: http://github.com/github/gollum
It seems to be a simple Sinatra app, and as such, it seems like it should be easy to deploy to Heroku. I can't seem to get it to work. Mostly because I know next to nothing about Rake and config.ru files.
Is it even possible to deploy a Gollum wiki to Heroku? If so, what would my config.ru file need to look like?
Update/Edit
lib/gollum/frontend/app:
module Precious
class App < Sinatra::Base
This gets called from bin/gollum
require 'gollum/frontend/app'
Precious::App.set(:gollum_path, gollum_path)
Precious::App.run!(options)
It's not possible to run Gollum from heroku. Certainly not as an editable wiki. The Heroku filesystem is read only. You might be able to use it to serve static content, but I'm not sure about that even.
As already mentioned, the problem is that the heroku filesystem is readonly.
But the real problem is underlying grit, which relies on the git command line tool. You can't work with remote repositories without cloning them to the local directory.
See the related question.
So, the solution will be to clone the repo to temporary path, work there and push changes to the remote repo. There is a much overhead: you need to clone repo every time a user browse a wiki page.
Another solution that comes to mind is making some API for grit that will enable to work with git remotely.
Yet another solution is to work with git over ssh.
http://docs.heroku.com/rack#sinatra
require 'hello'
run Sinatra::Application
if it is a sinatra app, that should do it for you.
I'm creating a webservice and I want to store the source on github and run the app on heroku. I haven't seen my exact scenario addressed anywhere on the 'net so far, so I'll ask it here:
I want to have the following directory structure:
/project
.git
README <-- project readme file
TODO.otl <-- project outline
... <-- other project-related stuff
/my_rails_app
app
config
...
README <-- rails' readme file
In the above, project corresponds to http://github.com/myuser/project, and my_rails_app is the code that should be pushed to heroku. Do I need a separate branch for the rails app, or is there a simpler way that I'm missing?
I guess my project-related non-rails files could live in my_rails_app, but the rails README already lives there and it seems inconsistent to overwrite that. However, if I leave it, my github page for the rails app will contain the rails readme, which makes no sense.
Also ... I tried just setting it up as described above and running
git push heroku
from the main project folder. Of course, heroku doesn't know I want to deploy the subfolder:
-----> Heroku receiving push
! Heroku push rejected, no Rails or Rack app detected.
Here's a simple solution that may or may not work for you.
Create two projects on GitHub. One project should be just the Rails app (i.e. everything inside the Rails app directory). The other project should be everything outside the Rails app directory.
Add the Rails app project as a git-submodule within the "container" project.
Now you can add Heroku as a remote on the Rails app repository separately and push it to heroku. Heroku will accept the push because it is just a Rails app with the expected directories and files.
A solution for the Heroku situation (not the README file):
If you're using the new Heroku Cedar (I believe it wasn't available when you first asked your question) then your processes (like the rails server process) start up using Foreman. Thus, you can place a Procfile in the root github directory that looks like this:
web: my_rails_app/script/runserver.sh
And then my_rails_app/script/runserver.sh could be a simple
#!/bin/sh
cd my_rails_app
bundle exec rails server -p $PORT
Locally, you should also create a file called .env (note the . at the beginning), which contains
PORT=3000
This file is read by foreman and used to set environment variables so that the port is set when you execute foreman start on your machine (from the root github directory, where the Procfile lies). The Heroku server takes care of the .env file on your dyno. The big advantage is you can set up multiple processes on the dyno that way!
Just overwrite Rails' default README file. There's no reason to keep it around. Put your other project-management-related stuff in the doc directory. While you certainly have valid reasons for wanting to set it up the way you did, you're just creating a headache for yourself by going against convention, and it's probably not worth the benefit.
I would add everything underneath /my_rails_app to the Heroku git repository. Then add GitHub as a remote and add everything underneath /project to the GitHub repository. Then you can push the Rails application to Heroku (from /my_rails_app) and push the full project to GitHub (from /project).