Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8103537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:34:27+00:00 2026-06-05T23:34:27+00:00

I have a Ruby on Rails application that needs to find a home in

  • 0

I have a Ruby on Rails application that needs to find a home in an Azure Worker Role.

I currently automate the deployment of the application with a batch file – a file that takes the apache and ruby installers, runs them, and then drops the RoR app in the appropriate directory. After the batch script finishes, Apache is serving to and from the application via port 80.

I’m new to Azure and trying to figure out how to do this.

From my understanding, I have two options here: OnStart with the installation files in Blob Storage, or a startup script. I’m not sure how to do the latter, but I have located the onStart method within the WorkerRole.vb file in the new Azure project I just created.

My question: Is it recommended to use OnStart to deploy the application (using the batch script)? If so, how would I go about integrating the script into the project? And – how do I get started with storing and referencing the files in blob storage?

I know these are super high-level questions. Any input or suggested reading would be super helpful. I have tried to google / search for relevant resources but haven’t been able to find much. Thank you for your time!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T23:34:29+00:00Added an answer on June 5, 2026 at 11:34 pm

    As long as you don’t need admin-level access (e.g. modifying registry, installing msi’s, etc.) you can do your setup from OnStart(), including launching your script. Just include the startup script with your project (don’t forget to set Copy Local to true).

    Same goes with startup script: you call your cmd file, which then executes the sequence for you. And if you give it elevated permissions, you can run installers, modify registry settings, install custom perf counters, whatever.

    In either case: you can keep your apache zip, ruby installers, etc. in blob storage and, at startup, download them to local storage. This saves you from bundling everything within the deployment, which gives you a few advantages (being able to update ruby / apache without redeploy, reduced package size, etc.).

    There’s a sample app on codeplex that demonstrates the basics of setting up Tomcat via startup script. For one more example, you can look at the scripts installed via Eclipse Windows Azure plugin for Java. These scripts are quite similar. The key is to have some way of downloading files from blob storage and then unzipping them. the codeplex project I referred to points to a sample app that does simple blob downloading. The Eclipse packaging provides similar functionality in a .vbs app. Here’s a snippet of one of my scripts from an Eclipse-based project:

    SET SERVER_DIR_NAME=apache-tomcat-7.0.25
    SET WAR_NAME=myapp.war
    rd "\%ROLENAME%"
    mklink /D "\%ROLENAME%" "%ROLEROOT%\approot"
    cd /d "\%ROLENAME%"
    cscript /NoLogo util\unzip.vbs jre7.zip "%CD%"
    cscript /NoLogo util\unzip.vbs tomcat7.zip "%CD%"
    copy %WAR_NAME% "%SERVER_DIR_NAME%\webapps\%WAR_NAME%"
    cd "%SERVER_DIR_NAME%\bin"
    set JAVA_HOME=\%ROLENAME%\jre7
    set PATH=%PATH%;%JAVA_HOME%\bin
    cmd /c startup.bat
    

    The codeplex project has a similar-looking script.

    Don’t forget: you’ll need to set up an Input Endpoint for your role (part of the role properties).

    To get blobs into blob storage, there are both free tools (like Clumsy Leaf CloudXplorer and paid tools (such as Cerebrata’s Cloud Storage Studio).

    To download blobs to local storage, you can either write a few lines of .net code (from OnStart) or just use the utility pointed to in the codeplex project.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have a Ruby (Rails) application that needs to make a lot of
I have created a table in my Ruby on Rails application that I am
I have a RoR application (ruby v1.8.7; rails v2.3.5) that is caching a page
I have an Ruby on Rails 3 Heroku application, which needs to perform text
The Setup I have a Ruby on Rails application that I manage from a
I have a ruby on rails application and it would be nice to see
I have Ruby on Rails 3.1 application and i use for Sphinx + Thinking
I have to to deploy a Ruby on Rails application to an tomcat application
I have created a blog application using Ruby on Rails which includes the ability
I have created a simple blog application with Ruby on Rails. The applications consists

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.