Skip to content

Latest commit

 

History

History
80 lines (49 loc) · 3.28 KB

File metadata and controls

80 lines (49 loc) · 3.28 KB

Deprecated sample - not maintained anymore (Summer 2016)

sample-ruby-on-rails-app-prototyping

Ruby Rails LMV License

Note: For using this sample, you need a valid oAuth credential for the translation / extraction portion. Visit this page for instructions to get on-board.

Links

Ruby Gem adn_viewer
ADN website
How the API Works and sample code
Live Sample

Motivation

Our View and Data API Beta adds powerful 2D and 3D viewing functionality to your web apps. Our REST and JavaScript API makes it easier to create applications that can view, zoom and interact with 2D and 3D models from over 60+ model formats with just a web browser, no plugin required!

This app shows you what you can do with the API.

Description

This Ruby on Rails application is meant to allow users to register and upload models made in over 60 different file formats. Users can store URNs, view their uploaded models and set publically visible viewables. A judge password allows judges to register and view the user set viewables. Go get your consumer key and secret at developer.autodesk.com!

Here is a simple documented ruby on rails app built using this gem: adn_viewer_gem_test_app. The tutorial in this repo is highly recommended for all Ruby developers using this gem.

The gem source code can be found here: adn_viewer

##Setup

If you would like to setup this app locally, please follow these steps:

Follow the instructions here to install Ruby and Ruby on Rails: rubyonrails.org/download.
Note: some sort of package management is recommended with Ruby and RoR. For example, RVM is perfect for the job.
Once you've downloaded Ruby, install Rails (this can take a very long while):

gem install rails

Clone this repo onto your own machine and go into the directory of the app: cd sample-ruby-on-rails-app-prototyping

IMPORTANT: Add the appropriate secrets.yml and database.yml files to the config folder. These have been deleted for security reasons.
Now install the bundle and migrate the databases:

bundle install
rake db:migrate
rake db:setup

Finally fire up a server and voila, your app works!

rails server

License

This sample is licensed under the terms of the MIT License. Please see the LICENSE file for full details.

Written by

Pratham Makhni Alag (Autodesk Developer Network)
http://www.autodesk.com/adn

For troubleshooting, visit forums.autodesk.com and post with reference to the view and data api.