Ruby on rails application and Middleman server on cloud

I have a ruby on rails application which runs on middleman server. i have deployed that application in windows azure cloud. after all installation once i give middleman server my application is up and running in my browser but once i close the command prompt the application stopped running. i have tried installing apache web server but if i run my server in browser its showing this error
"it works!
this is the default web page for this server. the web server software is running but no content has been added, yet. "

i have tried a ruby application which runs on webrick server is running properly but this this middleman server application giving that error.

please help me how to install a ruby on rails application which runs on middleman server in cloud.

Hi @saravanansekar,

It’s hard to tell exactly what you’re asking for. There are so many things I don’t know about your circumstance.

Just to clarify, Middleman’s intended to be “built” into static HTML. 99% of Middleman users are deploying the static output from the middleman build command. Middleman’s server mode is designed to be used only in development.

Having said that, if you really want to deploy the Middleman preview server, I’ve successfully done it in a production environment. I did it by running it in a standalone process, and then set up a reverse proxy in my web server configuration. There’s lots of different ways you can achieve this.

Both Rails and Middleman’s preview server can be run on the same server, but Rails doesn’t “run” on Middleman, and Middleman doesn’t “run” on Rails. Both would have to run in separate processes. How the two sites link together would be up to how you manage the web server configuration.

If you are looking to deploy the static site alongside the Rails application, you could simply drop the the output of the built site into the Rails app’s public directory (being careful not to touch any paths in public that Rails might depend on). Alternatively you could choose how paths are handled in your web server configuration.

Hope that makes things a bit clearer.

Pete

1 Like