engine yard No application found matching remotes: - ruby-on-rails

I'm trying to deploy my application to production on my laptop but i keep getting a
No application found matching remotes:
git#github.com:this_is_the_old_github_remote/Application.git
so this used to be the old remote but it was recently changed
so this makes sense but how do I fix this issue and tell it to go to the new one

There are a couple of ways to work around this issue.
Update the repository's config to have the proper URL for your remote branch.
Tell the ey cli tool which application and environment you are trying to deploy to.
The first method is probably better so you do not have to worry about this in the future.
To update your repository configuration you simply need to run git remote set-url origin https://url.to/new/repo/Applicatoin.git
Once the repository in your git configuration and the Engine Yard dashboard match, you should be able to deploy normally.
To work around this issue via the Engine Yard CLI utility, you will need to run ey deploy --app=<Application Name> --environment=<Environment Name>.
Please keep in mind, regardless of which method above you use to work around this issue, Engine Yard's automation will pull the application from the repository you configured via the dashboard.
Updating the remote on your git configuration does not update Engine Yard's configuration.
If your local copy of the repository has changes that have not been pushed to the remote repository configured at Engine Yard, the changes will not propagate to your instances.
If you continue to run into any issues deploying, please feel free to contact us via http://support.cloud.engineyard.com or in IRC on irc.freenode.net in #EngineYard.

Related

Public testing environment for RoR + Angular

currently I need a little hint for test running a RoR + Angular Application. And with test running I talk about that the "project owner" can see the current version of the project. For large projects with a lot of developers we had a build server, where the server got the current version from the git repository and deployed it as a "nightly build".
For projects where I'm the only developer I use dropbox to synchronize my working directory to a server, that is accessible for the project owner.
But now I'm working on a small project with 2 other developers. The build server is too much and the dropbox solution, well it's not going to work, because every one of us has a different state. And working on the same Dropbox directory is a no go.
So what's the best solution?
Consider running it on Heroku, which has a free tier. Once set up properly, deployments can be done by simply pushing to your Heroku git remote, or you can set it up to watch an existing remote repository branch (such as a particular branch on Github).
Or you could run it on your own machine. If you are behind a firewall you could set up a tunnel so your team can see it, with something like ngrok.

deploy a rails app with capistrano without a rails environment

I've been working on a rails project for a client that isn't technical. However, they want me to send over a deployment script, which their networks guys will use to deploy the application.
I've been using capistrano. But the problem is, cap is heavily dependent on the app itself. What i need is a script, that'd use the cap and config/deploy.rb but needs minimal setup on their local systems. The repo in the backbone is git based.
If this cant be achieved by capistrano, anyone knows of any other deployment utilities, that'd allow me stuff cap does and works independently? .. (i create symlinks and run some rake tasks in my :after_update block).
Thanks,
Hassan
If setting up a ruby environment to run cap deploy is not something that the "network guys" will be willing to do, then you're in for quite an uphill battle. Some suggestions to help alleviate this:
Have them use the railsready script to set up their environment
Give them a virtual machine (maybe a Vagrant box?) that can be used to deploy the instance
If you're doing a git-based deploy, you'll either have to set up a deployer key (and give this to them) or add them to your github project (assuming you're using github)
Consider bundling up the entire project and delivering as a tarball (or putting it into an rpm) and having them deploy this way (a quick&dirty way to do this is to deploy to a machine running the same distro as production, and tarring up the deployment directory)
Consider using a stack that more aligns with their network stack, like JRuby and warbler for deploying to Tomcat
Do some pair programming or at least screen sharing for the initial install. Sometimes the difference between loving and hating a platform comes down to the availability of help when problems arise.
Mina is like Capistrano but doesn't rely on being inside the rails application directory.
One option could be to setup something like Jenkins that will use capistrano to deploy. And your client can curl the jenkins build url to trigger a deploy.

Cap deploy - ERROR: Repository not found

I've inherited a project and am comfortable with the development side of things, but have poor sysops, and the Capistrano deploy is failing. For a project that has been deployed before by the previous dev:
cap deploy:check
runs fine, resulting in
You appear to have all necessary dependencies installed
But when I try to deploy, I get
...
ERROR: Repository not found.
...
I have:
Triple checked the github repo address
Confirmed I can push and pull fine from the repo on my local machine
Confirmed I can connect fine from the server to github via SSH
Confirmed I can clone the repo fine on the server
Tried with agent forwarding both on and off
Confirmed the repo path matches in .git/config and config/deploy.rb
At the moment, when agent forwarding off, the SSH into github from the server is returning the info for the previous dev, who still has access to the github repo.
Hi xxxxxx! You've successfully authenticated, but GitHub does not provide shell access.
When agent forwarding is on, I show as being the authenticated user.
Any tips on resolving this? More than happy for a decent URL that goes through troubleshooting this.
OK, figured it out by a process of elimination. It was the following line in 'deploy.rb'
set :deploy_via, "remote_cache"
When this is commented out it deploys fine. If I uncomment it, it breaks again with the same error. So that certainly seems to be the problem.
I have no idea why this would be happening. But for now, I'll close this.
I know I am way late to the game but I just ran into this issue with a project that I moved from Github to Bitbucket. I was able to checkout, update, push/pull from the repo on Bitbucket without issue however my initial cap deploy broke after moving to Bitbucket.
The short answer is that the remote cache on your server needs to be deleted. SSH into your server, and remove the entire cached-copy dir found inside the shared directory created by capistrano. The location of your shared and releases directory may not be the same as mine but this is all I had to do:
rm -rf www/shared/cached-copy
After this I was able to deploy without issue.
Hope that helps someone else that may run into this issue.
For troubleshooting tips--especially because you are deploying from a GitHub repo--I suggest reviewing the GitHub guide to Deploying with Capistrano. That guide also links to another you should review on managing deploy keys.
default_run_options[:pty] may be missing or incorrect in config/deploy.rb. This could cause the "successful auth, but no shell access for you" error.
Regarding the script still using the previous developer's credentials, the system account the capistrano script logs in with on the server (e.g set :user, "deployer") may have the previous developer's private key in ~/.ssh which the script may expect to use. If this is the case, you should reconfigure the script to use SSH agent forwarding according to the guides which would have the script start using your keys.

Using GIT in production Rails machines

Should my production Rails project use GIT? it will be easy for me to update the
servers and to push hot fixes, but what if I'll have a conflict during a pull?
and if I'll accidentally pull something wrong it make cause some downtime.
What is your advice on how to synch between the GIT repository & production?
Thanks
How about using a dedicated deployment system like Capistrano? It solves many of the issues you are trying to avoid.
Don't leave local changes on your production machines, and there is no risk of conflicts.
Production installs should pull from a dedicated branch/tag (e.g. use gitflow, production machines pull from the latest tag or simply master) - not the branch you regularly push to (develop, if you use git-flow).

Version Control and Deploy Rails Project with cPanel

In my server, what option i got is a basic unlimited server can host unlimited rails project
possible to manage gem because it is using cpanel latest version with a ssh
now my confuse is ,
how can i use the no ssh feature in the cpanel and ease my deployment ?
i don't know is that possible to use the capistrano and git with it
any guidance for this ? to make it possible to update with git push feature
i never deploy anything before ,
i tried to use heroku but i don't know why many user can make their file fit the 5mb space...
my project is now 30% at progress but the space used was 14mb...
so, i bought a cheap standard web server with cpanel . any one could help me in this case ?
usually how you guy deploy and where you deploy ?
recently one guy gave me a link for the github deployment, is that possible to make github use in the cpanel server ?
i mean like host and push the file into github and then link to the personal server ?
anyway, thx for person who reply me recently ^.^
i just develop for hobby...any cheap rails server suggest ?
Thx a lot for reply~
You could also try heroku (www.heroku.com) as a hosting platform. It has a simple deployment workflow that uses git.
Unelss you've done it already, you'll need to install git on your local machine.
Here's a bit about capistrano too.
Capistrano is basically a series of scripts (that you run from your local machine) that get your code and put it on your web server(s). You can configure capistrano to either check out your code from git on the production server, or to copy your code from your local machine.

Resources