Heroku Toolbelt fails to detect a set buildpack - json

I have tried manually clearing and setting the buildpack for my Rails app to heroku/rails. I have verified that I have a Gemfile, and I still get this error
remote: -----> Using set buildpack heroku/ruby
remote:
remote: ! Push rejected, failed to detect set buildpack heroku/ruby
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected
Which is confusing since I set the buildpack but then it can't detect it. Some of my routes are rendering json as I wanted this app to serve as a backend API. Do I need to add a buildpack for Node? Any other suggestions?

I had the app located within a redundant subfolder in the git repo. I fixed the problem by moving everything up a level, recommitting, and git push heroku master. Heroku was looking for a Gemfile in the top level, so I moved all the application files to the top level (where it should have been all along).

I reinitialized the repo and did it again. Did my commits and pushed. Worked!!!
git init
add heroku as a remote
git remote add heroku https://git.heroku.com/appname.git'
git add .
git commit -m "initial commit"
git push heroku master

Related

OpenShift Play Application Deployment

I just followed the steps as mentioned in the following Github repo to deploy a Play application to OpshShift:
https://github.com/opensas/play2-openshift-quickstart
When I tried uploading my sources to OpenShift, I get the following error:
remote: Stopping DIY cartridge
remote: Building git ref 'master', commit 54b44ff
remote: Preparing build for deployment
remote: Deployment id is 9379deb4
remote: Activating deployment
remote: Starting DIY cartridge
remote: chmod: cannot access `/var/lib/openshift/XXXXXXXXXX/app-root/runtime/repo/target/start': No such file or directory
remote: -------------------------
remote: Git Post-Receive Result: success
remote: Activation status: success
remote: Deployment completed with status: success
Why is there no target/start directory? Any ideas?
The stage task have been rewritten in Play 2.2:
https://www.playframework.com/documentation/2.2.0/Migration22 (Preparing a distribution)
Instead of mentioned repo please use this one:
https://github.com/JamesSullivan/play2-openshift-quickstart
If you're using play framework 2.2+, you'll have to change your openshift APP_COMMAND to start from target/universal/bin/{your-app-name} instead of target/start.
You can modify this in the .openshift/action_hooks/start file.

can't push/pull from mercurial repository - abort: error: An existing connection was forcibly closed by the remote host

I am planning to use mercurial for a new project but I'm having some problem accessing the bitbucket repository. I'm new to mercurial, but I have used git previously.
I get the following error when peforing a hg clone or push:
abort: error: An existing connection was forcibly closed by the remote host
I only have this problem when using my work pc, when accessing the repository from my home pc I can clone and push just fine, any ideas, is there some firewall setting that needs to be configured?
I'm using Mercurial-2.1.2-x64 on windows 7 x64 for both pcs.
So I found the source of the error, I had initially installed tortoise hg which had created the following mercurial.ini file in my user directory, once I deleted this file, it resolved the issue. I suppose the problem was that I had specified the repository url instead of an actual http proxy...
# Generated by TortoiseHg settings dialog
[tortoisehg]
cipushafter =
[http_proxy]
host = https://****#bitbucket.org/****/*** (my repository path)
Browse to the project folder in command prompt and run hg rollback.

Pushing to bitbucket: authorization failed

I'm a git & github user that's new to mercurial & bitbucket and I'm trying to use bitbucket for a project.
So far I've got write access to a new private bitbucket repository, and I got started by:
cloning
adding my existing project
committing
trying push, I get authorization failed via:
HTTPS
$ hg push https://mariusbutuc#bitbucket.org/DB2UAdmin/repo
http authorization required
realm: Bitbucket.org HTTP
user: mariusbutuc
password:
pushing to https://mariusbutuc#bitbucket.org/DB2UAdmin/repo
searching for changes
abort: authorization failed
SSH
$ hg push ssh://hg#bitbucket.org/DB2UAdmin/repo
pushing to ssh://hg#bitbucket.org/DB2UAdmin/repo
searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 9664 changes to 9664 files
remote: You're not allowed to write to this repository.
remote: transaction abort!
remote: rollback completed
remote: abort: pretxnchangegroup.bb_perm hook failed
also attempted via simple HTTP, got similar results as with HTTPS.
How can I get it to work?
Extra details:
python 2.7.1+
mercurial 1.7.5
on Ubuntu 11.04
The bitbucket account was opened under my gmail address [addr A].
The SSH key was made using the address from my company [addr B].
addr B was added to my account as a secondary address.
I had writing access for the mariusbutuc account, that had both addresses.
...I still couldn't pass the auth test.
Got an invitation form the Admin, on my work address - addr B. With admin rights, not only write.
Trying to accept the invitation, I couldn't: my account already had access to the repository.
Had to revoke my own access, just to be able to
accept the admin rights.
Pushed successfully via SSH:
$ hg push ssh://hg#bitbucket.org/DB2UAdmin/repo
pushing to ssh://hg#bitbucket.org/DB2UAdmin/repo
searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 9664 changes to 9664 files
remote: bb/acl: mariusbutuc is allowed. accepted payload.
I still have no idea why pushing via HTTPS [username/password] failed!
For those of you that arrive here from googling "pretxnchangegroup.bb_perm hook failed" this can be caused by trying to merge to a branch that you do not have the "write" permission under "branch permissions" on bitbucket.
Presumably this is because you should have used a pull request for the merge rather than going ahead and merging on your local.

How to reset a TeamCity build after stripping Hg changesets?

I recently needed to strip some changesets from my Mercurial repository. I then tried to run a build from TeamCity but got the following error message:
[09:44:25]: Updating sources: agent side checkout... (16s)
[09:44:42]: [Updating sources: agent side checkout...] Failed to perform checkout on agent: 'cmd /c hg update -C -r 507b8c8f4cdb' command failed. stderr: abort: unknown revision '507b8c8f4cdb'!
The error makes sense since the changeset no longer exists in the repo, but I don't know how to reset TeamCity to pull from the new tip. I'm guessing that I could copy the TeamCity build configuration to a new build, but then I'd lose my history.
Is this possible? Or have I corrupted my TeamCity build and need to start up a new one?
Add a new commit to the repository so that the tip revision gets updated.

Unbundle throws " abort: error: ftp error: no host given" when using a local network share with an UNC path

Before explaining my problem let me tell you the Mercurial setup,
We have the following repos,
RELEASE
DEVELOPMENT
BUGFIX
All the above repo are running on a central server using IIS and hgwebdir.cgi
Now coming to the problem,
I clone a local repo from DEVELOPMENT repo.
I make changes to the clone and commit (Not push).
I make a bundle from the clone and pass the bundle to QA who has cloned the RELEASE repo.
Now I try to apply the bundle to the RELEASE repo clone using hg unbundle
I get an error, abort: error: ftp error: no host given
What am I doing wrong? Can you give solution to the above problem keeping a Windows setup in mind?
It really sounds like you have a syntax error in your unbundle command. The normal usage is just:
hg unbundle c:\path\to\the.bundle
there's no ftp involved unless you're trying to use a ftp:// URL which isn't supported. Is it possible you have a directory named ftp and the parser is mistakign it for a component in a ftp URL?
Also, most folks wouldn't use bundles in the scenario you're describing. They'd just do:
hg push URL-or-file-path-to-QA
and push direct to QA's own repo (not to RELEASE)
People generally use bundles only when a network connection isn't possible or practical.
I experienced the same problem, I don't think hg likes uncs.
I mapped \server\DevSourceCode\Mercurial to R: and it worked fine, see below:
R:\Repositories\myproj>hg unbundle \\server\DevSourceCode\Mercurial\ChangeBundles\myproj_changes.hg
abort: error: ftp error: no host given
R:\Repositories\myproj>hg unbundle R:\ChangeBundles\myproj_changes.hg
adding changesets
adding manifests
adding file changes
added 0 changesets with 0 changes to 139 files
(run 'hg update' to get a working copy)