My name is Greg Winn I am a web developer, specializing in web application development. Take a look at some of my projects, then drop me a line.

Future Insights Live in Las Vegas June 16-20


Come see Jim Mayes and myself speak at Future Insights Live 2014 in Las Vegas. We will be talking about a few of our products along with how we run a lean startup.

If you plan on coming out to FI Live please use this discount code and save yourself 15% (FILSPEAK15)!

Lastest Posts

Using yStock Posted on 21 April 2013.

Active Merchant Posted on 17 October 2012.

Deployment with rubber Posted on 20 August 2012.

Using from_xml Posted on 10 August 2012.

Creating custom environments Posted on 28 May 2012.

Create a URL safe token Posted on 17 May 2012.

Give rake access Posted on 08 February 2012.

View older articles.

My Gems

Most of my projects can be followed on Github (@gregwinn)


This is a wrapper for the Lnkdto API. This gem gives to access to both single url and batch url requests.

Gem Version Build Status


This Ruby gem named Ystock will pull stock information such as price, volume, and change from Yahoo! & Google Finance.

Gem Version Build Status


Posted on 20 April 2014

Rails API and CORS

While building a mobile application using PhoneGap for a new Rails app using a Rails API I came across a Cross-Origin issue not allowing request to be made via Javascript. After a short time and setting headers myself I cam across a gem that basicly saved me days of work, aloowing me to set the headers for the application via a rack app.

Rack CORS Middleware

Rack::Cors provides support for Cross-Origin Resource Sharing (CORS) for Rack compatible web applications. The CORS spec allows web applications to make cross domain AJAX calls without using workarounds such as JSONP.


    # GemFile
    gem 'rack-cors', :require => 'rack/cors'

In your application.rb file you can then set the correct origins you would like to allow.

    # application.rb
    config.middleware.use Rack::Cors do
      allow do
        origins '*'
        resource '*', :headers => :any, :methods => [:get, :post, :options]

Checkout Rack-CORS