Turbogears 2 / Pylons - pylons

I am really confused i have a directory structure as follows.
/foo/bar/project/
under project is the python environment via virtualenv.
I have two additional folders live, and beta.
Live is served via apache wsgi and beta is served using paster.
Some how the live site is serving templates from the beta directory. To make sure i wasn't losing my mind I renamed the beta directory to wtfbeta expecting the server to throw an error helping me track down what went wrong.
Nope, instead it just falls back to loading the correct template from the live directory. (after service apache2 restart).
I am really stuck here.

This issue was related to both sites using the same virtualenv.

Related

How to start Puma/Rails/Nginx on Debian after boot

Ok, I'm deploying my Rails App using Capistrano. I'm also using Puma. I've followed this tutorial to get it to work, although I'm using Debian rather then Ubuntu.
Everything works fine and I can deploy my app without issues. However if my server crashes or the server restarts, the App doesn't restart itself and the only way I got it to restart was deploying it again with the following command cap production deploy from within my App in my local machine, which we all can agree that's not ideal.
There's loads of information on the web on how to deploy a Rails App with Passenger, which I'd rather avoid to use due to lack of resources on the server part. I've also found this tutorial which seems to be a bit outdated.
Can someone please point me to an updated tutorial or give some directions on how I could get my App to start/restart who the server?
Many thanks
EDIT
As per #mudasobwa's comments, I'm detailing the steps I've taken after reading this page:
I have copied the contents of https://github.com/puma/puma/blob/master/tools/jungle/init.d/puma into /etc/init.d/puma made it executable. I've also copied the contents of https://github.com/puma/puma/blob/master/tools/jungle/init.d/run-puma into /usr/local/bin/run-puma also made it executable.
Lastly I've created a puma.conf file in /etc.
After that I've created the following directory: /path/to/app/tmp/puma and added these two files: pid and state. Note that I've also added the aforementioned folders into Capistrano's shared links structure.
After the above I've restarted my server and the App did not start as I expected.
What am I missing here?

Which folder should i put into filezilla for ROR?

I have the following directory structure:
Which files must I drag into remote site of Filezilla for this ROR project?
When deploying a ROR project you should must use a VPN server. Have you used git for your project? Try to deploy in heroku first. To test your site and have a good practice when deploying rails.
https://devcenter.heroku.com/articles/getting-started-with-rails4
The answer to the question would be: everything
But most likely, copying everything is not gonna make it run, here is why: Rails applications live in separate processes that have to be specifically maintained. On your dev machine, you do this with bundle exec rails server. This is a key difference to how the apache php module works for php apps: There the php interpreter is embedded within the apache process and therefore shares its life cycle automatically.
If you have control over the server you are deploying to, I recommend to start with the Phusion passenger apache module. It takes care of starting your rails processes as needed. In case you are using ubuntu 14:04, I can't recommend to just apt-get install libapche2-mod-passenger because I had many problems with it.
If the server is maintained by somebody else, I'd ask this someone for a solution.
I hope this helps.

Rails server starts app in another folder

I'm running a ruby on rails app on Ubuntu, but I found something weird.
I was developing an app that was giving an error that I could not solve, so I thought about removing the folder and restarting from a previous saved version, but when I run
rails server
the application being referenced is still the old one, even if it is in the Trash (the error message now references file in the Trash).
What's going on?
Probably symlinked
You'll be much better suited to running the likes of Phusion Passenger, which handles the serving of Rails applications for you.

How to install Ruby script on server?

I apologize in advance for the fairly simple question.
I am familiar with PHP, but am trying to install this Ruby script on my server for the first time. It's an open source script that I've forked from github, but unfortunately does not have any instructions. I have Ruby on Rails, and MongoDB installed already.
Does anyone know what the beginner steps are to get started? Should I upload everything via FTP to the public directory, or is there something else to this?
Most Rails projects are much better served by having a proper deployment strategy. Typically this involves making your own repository, easily done by forking that existing application, and cloning that on to your server using git. To make changes in the future, do your work on a development copy, push that into the repository, and pull down the changes on the server.
Unlike PHP where many parts of the application can function independently, Rails applications tend to be far more integrated and uploading it piece by piece is not going to work in the long run.
Rails applications can run stand-alone using the provided rails server tool but this is really only intended for light-duty testing or development work. A more permanent solution is to use something like Passenger to do the hosting for you.
Passenger will take care of launching your application when calls are made to the site you've configured in Apache or nginx, depending on which you end up using. Passenger is popular because it's quite easy to get running.
There are other approaches like unicorn if you're feeling more adventurous.
When you make changes to your Rails application in production mode you will have to create a tmp/restart.txt file in the main application directory to tell your web server to restart the process. This is not a requirement in development mode.
Due to the relative complexity of this process once you include all the various steps, you will probably want to use a deployment automation tool like capistrano.

Preparing for Rails deployment

Getting ready to deploy a rails project on Mac OS X Leopard Server (such that it matters).
Got a few questions for someone with Rails experience:
where should directory containing the project go? inside the website's root folder or out?
who should "own" that directory? www? root? something/someone else?
hope to continue serving static pages via Apache... would like rails app to be served by mydomain/xxx/railsapp. is there a standard naming convention for 'xxx'?
not expecting too much traffic to begin with...just like to keep things as simple as possible.
Use Capistrano for deployment. FAQs and tutorials on the website will make most of your questions fall away.
For running the site, I recommend Phusion Passenger. There's a Capistrano recipe for Passenger here.

Resources