Giter VIP home page Giter VIP logo

azurerubydeployment's Introduction

AzureRubyDeployment

Custom Deployment Script for Azure Web Sites

For Windows

Create Rails Application

To install the RubyInstaller, provide a Ruby on Rails application development environment.

http://rubyinstaller.org/

When the installation is complete, create templates using the "gem install rails" and "rails new" command.

gem install rails

rails new sampleapp
cd sampleapp

Modify Gemfile

To install the application server to append in the Gemfile.

 # use thin app server
gem 'thin'

Copy files from this repository

  • .deployment
  • deploy.sh
  • startup.bat
  • Web.config

Add Git Repository

Add a git repository, push to Azure Web Sites.

git init
git add .
git commit -m "initial commit"

git remote add https://<username>@<sitename>.scm.azurewebsites.net:443/<sitename>.git

For OS X

working.

Known Issue

gem install json / thin, failed

Select commit from the deploy tab of the azure Web site failed, please try again.

azurerubydeployment's People

Contributors

shibayan avatar takekazuomi avatar

Watchers

 avatar  avatar  avatar

azurerubydeployment's Issues

Fail to install the native module (ex. json / thin)

Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies...
Installing rake 10.4.2
Installing i18n 0.6.11

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        d:/home/site/wwwroot/bin/ruby/1.9.3/bin/ruby.exe extconf.rb 
creating Makefile

make
generating parser-i386-mingw32.def
compiling parser.c
linking shared-object json/ext/parser.so

make  install

Gem files will remain installed in d:/home/site/wwwroot/bin/ruby/1.9.3/lib/ruby/gems/1.9.1/gems/json-1.8.1 for inspection.
Results logged to d:/home/site/wwwroot/bin/ruby/1.9.3/lib/ruby/gems/1.9.1/gems/json-1.8.1/ext/json/ext/parser/gem_make.out
An error occurred while installing json (1.8.1), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.1'` succeeds before bundling.
An error has occurred during web site deployment.
bundle install failed

Deployment works but not sure how to run it

I deployed it to a new site. The deployment was successful:

Counting objects: 23, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (14/14), done.
Writing objects: 100% (23/23), 3.95 KiB | 0 bytes/s, done.
Total 23 (delta 8), reused 23 (delta 8)
remote: Updating branch 'master'.
remote: Updating submodules.
remote: Preparing deployment for commit id 'f530e2cf7a'.
remote: Running custom deployment command...
remote: Running deployment command...
remote: Installing ruby runtime.
remote: ......................................................................................................................
................
remote: Installing bundler
remote: ........
remote: Handling Ruby Web Site deployment.
remote: KuduSync.NET from: 'D:\home\site\repository' to: 'D:\home\site\wwwroot'
remote: Deleting file: 'hostingstart.html'
remote: Copying file: '.gitattributes'
remote: Copying file: 'README.md'
remote: Copying file: 'startup.bat'
remote: Copying file: 'Web.config'
remote: Finished successfully.
remote: Deployment successful.
To https://[email protected]:443/DavidRuby.git
 * [new branch]      master -> master

But then, I'm not sure what's supposed to happen when I hit the site. It's hanging, and I see an error in eventlog.xml:

    <Event>
        <System>
            <Provider Name="HttpPlatformHandler"/>
            <EventID>1000</EventID>
            <Level>0</Level>
            <Task>0</Task>
            <Keywords>Keywords</Keywords>
            <TimeCreated SystemTime="2014-12-04T18:34:33Z"/>
            <EventRecordID>1942062859</EventRecordID>
            <Channel>Application</Channel>
            <Computer>RD00155D4425C9</Computer>
            <Security/>
        </System>
        <EventData>
            <Data>Process '26728' failed to start. Port = 11904, Error Code = '-2147023436'.</Data>
        </EventData>
    </Event>

So it looks like maybe the ruby process fails to start?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.