sinatra

Is there a JRuby-Rack Sinatra Warbler Project archtype?

Is there a project archetype (or whatever the ruby community calls it) for a jruby + rack + Sinatra project that creates a WAR deployment file with all required dependencies all ready to go? What I want is the equivalent to "rails appname" that creates a ready to go project with ant/rake scripts and a basic directory hierarchy all ready...

Trying to Workout how-to run a Ruby (Sinatra) app on the Ebb webserver.

I need to write a super fast Ruby application to process web requests on Sinatra - and want to run it on the Ebb webserver. But I cannot work out how to do this. Could someone please help me? ...

POSTing an HTML form to remote.cgi - written in Ruby?

I am working on a website hosted on microsoft's office live service. It has a contact form enabling visitors to get in touch with the owner. I want to write a Ruby script that sits on a seperate sever and which the form will POST to. It will parse the form data and email the details to a preset address. The script should then redirec...

Validating nested models?

To be more specific, "How do I validate that a model requires at least x valid associated models to be created?". I've been trying to validate nested models that get created in the same form as the parent (and ultimately show immediate validations a la jQuery). As a popular example, lets assume the following models and schema. class Pro...

Develop iPhone app without a Mac?

Possible Duplicates: How to develop iPhone applications on a windows PC How can I develop for iPhone using a Windows development machine? I'm looking to build an iPhone app for my wife's phone, but am not interested in buying a Mac as a development platform for a one-off piece of work. The app: should run standalone on the ...

How to create heroku based Sinatra apps

I am trying to create Sinatra based heroku app without any luck? ...

Disadvantages of sequel gem

Are there any alternatives to sequel orm when working on Sinatra based app ...

Deploying Compojure/Sinatra Applications.

What is the preferred way of deploying a compojure/sinatra applications? I have multiple sites running on the host so i can't run jetty/mongrel on port 80. How should i handle multiple sites/applications running at the same host? ...

Sinatra / Ruby Server Push

What is the best way to push data from a server written in Sinatra (ruby) to a client? Think similar to a chat room, but without ajax polling every 2500ms. I know of Juggernaut in rails, but was curious about Sinatra. Thanks, -Tom ...

Sequel + Sinatra + Phusion Passenger + MySQL Connection Management

We are using Sinatra and Sequel for a small API implementation. The problem we have however is that on every page request Sequel opens new connections to MySQL, and keeps them open till they timeout, or you restart Apache. There's not a lot of documentation on how to reuse connections, so any help, explanations, and/or pointers in the r...

error happens when I try "all" method in datamapper

When I try to do this in Sinatra, class Comment include DataMapper::Resource property :id, Serial property :body, Text property :created_at, DateTime end get '/show' do comment = Comment.all @comment.each do |comment| "#{comment.body}" end end It returns this error, ERROR: undefined method `by...

What is problem? when undefined method `bytesize' for #.

I'd like to store and update blogger labels to datastore in GAE. When I run that code, I get this error: javax.servlet.ServletContext log: Application Error /base/data/home/apps/yet-another-problem/1.334886515480009498/WEB-INF/gems/gems/sinatra-0.9.2/lib/sinatra/base.rb:45:in each': undefined method bytesize' for #<Hash:0x86684c> (NoMet...

Running Sinatra app with Mongrel on Windows

I'd like to start a Sinatra app from Mongrel on Windows, rather than Sinatra starting Mongrel in the background. Is there a simple way to use Mongrel for Sinatra? It's looking for a rails app by default. Edit: Suggested solution is to simply run a VMWare or SunBox with real Linux and deal with the corporate issues that way. ...

How to debug/test email transfers in Sinatra/Ruby

Hey folks, Im using Pony to send email withing my sinatra applications. But the problem - i cant figure out how to debug or test it. Lest say, in php you can configure sendmail fake app (in php.ini) that will store all outgoing email as plain textfiles with all data in it. How about ruby apps? Is it possible? ...

Using JSP tags in JRuby J2EE app

Is there a way to use JSP tags in JRuby apps deployed as J2EE apps? For example, if I have a Sinatra app being called through Rack via a JSP tag, can I use JSP tag libraries inside the Sinatra templates (e.g., Haml)? ...

text search to distinguish rails projects from other types of ruby web applications - merb/sinatra/ramaze

If I want to perform a search on a directory that contains thousands of different ruby web applications and I want to find only those directories that contain rails projects, what text would I need to look for within each directory to uniquely distinguish the rails projects from the other project types? At the moment, I have decided to ...

How to convert a Net::HTTP response to a certain encoding in Ruby 1.9.1?

I have a Sinatra application (http://analyzethis.espace-technologies.com) that does the following Retrieve an HTML page (via net/http) Create a Nokogiri document from the response.body Extract some info and send it back in the response. The response should be UTF-8 encoded So I came to the problem while trying to read sites that use...

Can Sinatra be used with IronRuby?

Hello IronRuby fans. I'm trying to install the following ruby gem on my mac: http://www.sinatrarb.com/intro.html I get the following message: michael-rosarios-macbook:bin michaelrosario1$ mono ir.exe igem sinatra ERROR: While executing gem ... (RuntimeError) Unknown command sinatra michael-rosarios-macbook:bin mi...

User sign-up with email verification, and authentication in Ruby

I'm trying to make a web app in Sinatra, and I was wondering if there was a good solution for user sign-up with email verification, as well as authentication - perhaps as rack middleware? OpenID support would be nice to have too. I suppose I can roll my own, but I didn't want to reinvent the wheel. If I have to do so, can anyone point m...

How to get Sinatra to auto-reload the file after each change?

I am using # my_app.rb load 'index.rb' and start the sever like this ruby my_app.rb but it never reload any changes I made in index page. Did I miss anything here? thanks ...