Learn Web Development with the Ruby on Rails Tutorial Sinatra (software) Designed and developed by Blake Mizerany, Sinatra is small and flexible. It does not follow the typical model–view–controller pattern used in other frameworks, such as Ruby on Rails. Instead, Sinatra focuses on "quickly creating web-applications in Ruby with minimal effort. Sinatra was created and open-sourced in 2007. Sinatra has inspired a lot of micro frameworks in Ruby and other programming languages. In July 2011, some unknown individual or group, posing as various members of the Sinatra core team, discredited the Dancer project.
dannycoates/node-inspector Ruby on Rails RVM: Ruby Version Manager - RVM Ruby Version Manager - Documentation Sinatra: README This page is also available in Chinese, French, German, Hungarian, Korean, Portuguese (Brazilian), Portuguese (European), Russian, Spanish and Japanese. Sinatra is a DSL for quickly creating web applications in Ruby with minimal effort: # myapp.rb require 'sinatra' get '/' do 'Hello world!'end Install the gem: And run with: View at: It is recommended to also run gem install thin, which Sinatra will pick up if available. Routes In Sinatra, a route is an HTTP method paired with a URL-matching pattern. get '/' do .. show something .. end post '/' do .. create something .. end put '/' do .. replace something .. end patch '/' do .. modify something .. end delete '/' do .. annihilate something .. end options '/' do .. appease something .. end link '/' do .. affiliate something .. end unlink '/' do .. separate something .. end Routes are matched in the order they are defined. Route patterns may include named parameters, accessible via the params hash: Or with block parameters: type
Using Eclipse as Node Applications Debugger · joyent/node Wiki First, there is new Nodeclipse project, that lets to create, edit and debug Node.js application in fully integrated way. It uses modified Eclipse debugger plugin for V8 (with some bugs below fixed). The usage is much simplified (right-click .js file Debug As→ Node Application). Eclipse debugger plugin for V8 can be easily used to debug node scripts. node --debug[=port] NodeApp.js node --debug-brk[=port] NodeApp.js The --debug option will just enable remote debugger connection on given port and then start the application normally. The --debug-brk option is needed when your script is short lived (no time to attach debugger) and/or you want to observe the NodeApp.js execution from the very start. Installation Rather than installing the V8 Eclipse Debugging Plugin on an existing Eclipse Java or Eclipse C++ installation, you might want to install the plugin into its own Eclipse Platform. Download a clean slate Eclipse Platform for your operating system. Sample Debugging Session
Stack Overflow How to write a Ruby and Rails 3 REST API Background I’ve always wondered how I’d go about publishing a real REST API on the web to do something. In this example, we’ll create an employee manager app-thing. It’s not particularly interesting but it shows what “API” means. In another bit, we’ll create an “API” meaning a library to interact with this web service. Caveats If you are just getting started with Rails and Ruby, you might find that this tutorial is really long and includes a lot of syntax. As an alternative, I suggest taking a look at Grape and Sinatra if you are finding Rails to be a little too heavy. The rails app Ok enough caveats and intro. update:This was last tested with 3.2.12. Database setup In this example we are going to use Sqlite3 but you can easily substitute MySQL or some other database here. Generate some default UI with scaffolding.rails g scaffold employee name:string extension:integer Create our database tables from what the scaffolding just generated.rake db:migrate <! Start rails.rails s CRUD with curl <? <?