Hi,
I'm trying to implement single sign-on using facebook in my ruby sinatra app. So far, I've been following this tutorial:
http://jaywiggins.com/2010/05/facebook-oauth-with-sinatra/
I am able to send a request for a user to connect to my application but I'm having trouble actually "getting" the access token. The user can connect wit...
I have been using Sinatra for sometime now and I would like to add some realtime features to my web-app by pushing the data via websockets.
I have successfully used the gem 'em-websocket' on its own, but have not been able to write one ruby file that has a sinatra web server AND a web-socket server.
I've tried spinning the run! or star...
Hi,
I'm building an application in ruby using the sinatra framework and am having trouble with rendering some fbml elements.
I'm currently trying to render an fb:multi-friend-selector so the user can select which friends they want to invite. However, when I write the following in my code:
<fb:fbml>
<fb:request-form action="/invit...
I see there is one for staticmatic,
and plenty in the Ruby toolbox for rails menu builders,
but I can't seem to track one down specifically for Sinatra.
...
I have a Sinatra app with a long running process (a web scraper). I'd like the app flush the results of the crawler's progress as the crawler is running instead of at the end.
I've considered forking the request and doing something fancy with ajax but this is a really basic one-pager app that really just needs to output a log to a brow...
Say I have a Sinatra route ala:
put '/data' do
request.body.read
# ...
end
It appears that the entire request.body is read into memory. Is there a way to consume the body as it comes into the system, rather than having it all buffered in Rack/Sinatra beforehand?
I see I can do this to read the body in parts, but the entire body s...
I'm running Sinatra 1.0 with HAML, my form has a number of checkboxes, for example books I like, and you would select all the books you want. The checkbox name is "books".
In sinatra params['books'] there should be an array of all the books that were checked, but it only has the last item that was checked, not an array.
How can I get a...
I'm using Rack to try to implement "Remember Me" functionality in my Sinatra app.
I'm able to set the session cookie to expire when the session ends or in X seconds time but I'd like to do both.
For example, if a user has clicked "remember me" then I wish for their session to end after X seconds. Eg, my app.rb has a line that looks lik...
I have been learning Ruby lately, and I want to upload a test web application to my server. But I can't figure out how to get it to run on my shared hosting.
My Hosting Details
Shared Hosting with JustHost (see here for list of features)
OS: Linux
Apache: 2.2.11
cPanel: 11.25.0-STABLE
No SSH access.
Can install Ruby Gems.
Can't instal...
I've been learning the Ruby web framework Sinatra lately, and I'm finding it great to use. Most of the articles and blogs I have read about it seem to assume that it is good only for small websites, or 'tiny' web-apps. Is this true? Can a complete web application be built in Sinatra, or is Ruby on Rails the way to go?
...
I like the sinatra framework, but might have to work in python. A quick web search has uncovered a few python equivalents including itty, flask and juno.
I'd like to know people's experience of these, or other sinatra equivalents. Which would you recommend?
...
Hi All
I'm just starting to learn my way around CouchDB and Sinatra, but am struggling to find some basic examples of integrating the two via CouchRest. The CouchRest docs assume a little too much to be useful to me yet.
Does anyone have links to useful examples/articles/docs?
...
Hi All
I'm working on my first Sinatra/CouchDB project and I'm getting an error I can't explain.
Here's my rackup (config.ru) file:
require 'rubygems'
require 'couchrest'
require 'patina'
set :environment, :development
set :root, File.dirname(__FILE__)
set :run, false
FileUtils.mkdir_p 'log' unless File.exists?('log')
log = File.new...
Hi I'm looking to write a multiplatorm tasks application for technical people. I want to handle as many platforms as I can (web, shell, desktop) and therefore I have decided to begin with a server/API.
I want to write it in Ruby, however i think that Rails is a bit too heavy for this, even though it would do the job. Sinatra also doesn'...
Hi!
I'm developing a Sinatra app that consists of an upload form, with a progress bar indicating how much of the upload has completed.
The process, as described by ryan dahl, is the following:
HTTP upload progress bars are rather obfuscated- they typically involve a process running on the server keeping track of the size of the te...
I have a multi-language website and I'm puting the language in the URL like domain.com/en/. When the user doesn't put the language in the URL I want to redirect him to the page in the main language like "domain.com/posts" to "domain.com/en/posts". Is there an easy way to do this with Sinatra?
I have more than one hundred routes. So doin...
I'm trying to get a sinatra app as a subpath in my rails 3 app.
Specifically, the resque queuing system has a sinatra based web interface that I would like to have accessible through /resque on my usual rails app.
You can see the project here: http://github.com/defunkt/resque
I found some people talking about adding a rackup file and ...
How do I take a numeric month, day and year from three separate text inputs and parse a proper value for my DateTime field in the db?
...
I have the following rake file to create a static version of my sinatra app,
stolen from http://github.com/semanticart/stuff-site/blob/master/Rakefile
class View
attr_reader :permalink
def initialize(path)
filename = File.basename(path)
@permalink = filename[0..-6]
end
end
view_paths = Dir.glob(File.join(File.dirname(__...
I just stared learning Sinatra and DataMapper while building a simple blog. I seem to have encountered a problem getting my Many-To-Many association working. I'm trying to associate categories with posts. Upon creation of a post, the category association is not created.
Here are my models:
class Post
include DataMapper::Resource
...