I built a Ruby on Rails application that is running on Heroku.
For reasons currently unknown to me, the page formatting of my web app has gotten a bit messed up on my local source code, and I'd like to download the not-messed-up copy from Heroku, and work with that instead.
Is there any way to do this? Thanks in advance.
By the way, I tried downloading the CSS files from the Heroku hosted site, and it still doesn't look right.
You will need to clone it:
git clone git#heroku.com:your-app.git
Related
So, I did the "smart" thing of deleting the local branch where I had just fixed a bunch of stuff and now my only working copy of it is in my current heroku release. I tried using git pull and also tried using the process of creating a tracking branch to have a local copy of what is currently on heroku, but neither seems to have worked. When I bring up RubyMine and look at the source files they are the older versions before I updated them with my fixes. Can anyone suggest what I might be doing wrong? I've used heroku/git for a little while now but mainly to push updates to heroku. This is my first time trying to pull code down from it. I am tempted to try using heroku git:clone but worried that might be a fatal mistake if it stomps on my local stuff and then I have no complete working copy. Thanks for your help.
I am trying to deploy my rails app to heroku. However, it seems that there is a long process to do. I have to change my db but I do not know how! I also want to know how to push to heroku please!
Thanks in advance!
I think you might be interested in Michael Hartl's tutorial where there is section on deploying to Heroku.
Remember that you will need Git before deploying to Heroku. There is good info on that in same tutorial here.
I hope this helps.
Read this instruction https://devcenter.heroku.com/articles/getting-started-with-rails4
I usually create a Git repo on GitHub or BitBucket and push my Rails project there. Then I go to Heroku website, manually create a new project there (in a dashboard) - and right after that step Heroku provides a detailed list of the Git commands describing how to pull your code from, say, GitHub.
After that you need to run migrations on Heroku - you can do that on your local machine in the console window - but you need to install Heroku CLI (locally) first.
That's it basically. After that Heroku starts your app automatically.
It is not required for you to deploy your code on GitHub or BitBucket. After you init a Git repo locally, you can directly push to Heroku Git. But I prefer use BitBucket as a convenient storage additionally.
I have a Rails project under git.
The structure is:
SomeProject
-Docs
-Src
-Rails
Rails is the root of the rails application, but SomeProject is the root of the repo.
When I try and push to Heroku I get:
Heroku push rejected, no Cedar-supported app detected
So my questions are:
Would this be resulting because the rooot of the repo and the root of the Rails application are different?
If so is there a way I can tell Heroku where the root of the Rails application is?
If not what else would cause this problem?
This is not an ideal situation, especially for heroku, but the generally accepted solution is pretty straightforward. It will take a bit of work on your behalf, but nothing too bad.
Create two repositories, one for the rails app, and one for "SomeProject."
Add your rails app as a submodule to "SomeProject." You can add them pretty easily, using something like git submodule add git#github.com:user/rails_app/ rails. This will add the rails application as a submodule to your project, so it's essentially it's own repository. Find more information here.
Add heroku as a remote to the submodule, and when you want to deploy the app, push from the submodule, rather than the entire project.
This is not as easy as git push heroku master:'/rails', but nothing like that exists (yet, anyway).
Hope this helps!
The easiest solution is to split out your Rails application into its own repository, as andrewpthorp suggests.
Another solution is to write your own buildpack in a separate repository, based on heroku/heroku-buildpack-ruby but customized to support your alternate project layout, and use that to deploy your application.
Hi i have tried using gollum-site gem, but it seems to only generate the site on localhost:8000 by default. How can i get the markdown wiki hosted on heroku. Anyone tried doing it before ?
There was a thread on this a while ago. It looks like it isn't possible because of Heroku's readonly filesystem and the fact that you don't have access to git.
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. — Vanuan
There is GitHub repository: heroku-buildpack-gollum-site that seem to do just what you want. It uses a modified version
of heroku-buildpack-php to install an Apache pack to heroku.
The answers targeted to Gollum are not appropriate, as here any server can serve the static generated site. No need to host Gollum (or Gollum-site) itself.
The question is old now, but some people can still need the answer!
Can you install git on Amazon and push assets (js, css, img) easily? Something like Heroku but with assets and S3 would be awesome.
Some people seem to use JungleDisk to sync a local git directory to s3, but that's too bulky. I tried installing jgit on a mac but to no avail, and that thing looks ancient. Is there anything else or does this type of thing just not work?
I've tried most of the gems out there for heroku asset deployment/optimization, but they all either require you to host them on heroku, or to run a rake task, which is not ideal.
You can use s3cmd --sync LOCAL s3://BUCKET/PREFIX to accomplish this. It is best if each asset has a version number in its name. Otherwise you can have weird issues such as the browser caching version 1 of the CSS and using version 2 of the JavaScript, causing undefined behavior.
How about setting up an EC2 image, mounting the s3 image on there and setting up a bare git repository to push to on said S3 image?
Tools recommend by other answers are out of date.
This one is up to date: https://github.com/schickling/git-s3
See Jammit s3, it's a great solution (zip + cloud):
https://github.com/railsjedi/jammit-s3
The problem with Jammit s3 is that you cannot manage versions of your files properly. It might take end users a while until they get the most update to date JS/CSS file.
You might find this useful, in case you use PHP for your application (otherwise this code can be adapted to your needs): https://github.com/SupersonicAds/git-hook-php-s3-files-revisions
Jammit S3 didn't have the control I was looking for, so I wrote my own CLI script:
https://github.com/bradt/git-deploy-s3