Data dodania Pytanie
2017-03-30 18:03 Difference between a wildcard and a named route in Sinatra »
I've been watching several tutorials on Sinatra and can't find the difference, between, say: get "/hey/*/there/*" vs. get "/hey/:first/there/:seco...
(1) odpowiedzi
2017-03-28 17:03 Where do i have to start the service 'rackup' for sinatra while using rvm on ubuntu »
i am developoing an webapp in the IDE rubymine on ubuntu and i recently installed the gem sinatra for my gemsets to write an REST-API for my webapp. I...
(1) odpowiedzi
2017-03-28 15:03 Sinatra app cannot find ActiveRecord tables »
I'm writing a Ruby app using Rack, Sinatra, Active Record, and SQLite3 (in-memory). I setup my in-memory DB as follows: class MyDatabase def sel...
(0) odpowiedzi
2017-03-26 17:03 sessions arent working on sinatra »
So i've been using sinatra and well no matter what i try i cannot seem to get sessions to work as intended. Im enabling session/cookies with the fol...
(0) odpowiedzi
2017-03-25 17:03 Connect to local mac server from device »
Im trying to connect to a ruby sinatra server that im running locally on my mac from an app using the following code: func load(finished: @escaping (...
(1) odpowiedzi
2017-03-24 15:03 Ruby how to call a class setter with yield »
I was able to get my code working, but I don't like the way it works syntaxually - not sure if that is even a word. My code currently: user.set_phon...
(1) odpowiedzi
2017-03-23 05:03 Sinatra app form isn't posting the entire form »
I have a basic Ruby/Sinatra app with a form that doesn't seem to be working quite right. The form has two inputs, a text box and a textarea. When I in...
(2) odpowiedzi
2017-03-22 16:03 Use Sinatra's action as method »
I want to call a Sinatra action as a method. For example, I have defined get '/' do puts "hi" end I want to call the above as a method but not as...
(0) odpowiedzi
2017-03-22 13:03 How does Module change the scope? »
My understanding of scope I have been a Javascript developer for a long time and I am used to this... var globalVar = "some value"; getGlobal...
(1) odpowiedzi
2017-03-22 08:03 Validating new MongoID record against existing documents »
I'm building a REST service with Ruby, Sinatra and MongoID. I've set up basic validations for various fields but for two of the fields I need to valid...
(0) odpowiedzi
2017-03-20 22:03 How does Ruby performance compare to other common languages as of 2017? »
A few years ago when I was new to Ruby (and development in general) there were many discussions around about how Ruby was slow on the MRI interpreter....
(0) odpowiedzi
2017-03-18 00:03 How to display results from database in Sinatra using Sequel? »
I have an SQLite3 database called sk.db with a table called Sked that displays a schedule of sports matches with a column date. I am simply trying to ...
(1) odpowiedzi
2017-03-17 07:03 Sinatra App Works Locally but Internal Server Error on Heroku »
The relevant code causing the problem seems to be this from my view: <input type="checkbox" id=<%= "#{a[0]}#{ndx}" -%> class="toggle" /> ...
(1) odpowiedzi
2017-03-17 01:03 How do I configure Sinatra to use structure.sql instead of schema.rb? »
I've got a Sinatra app that I'm setting up with a database using ActiveRecord. Due to one of the quirks of this database (namely a string primary key...
(1) odpowiedzi
2017-03-16 17:03 Single or Multiple logger instance in a web project »
I'm work on build a log system in my project, which is a Ruby Web App base on Sinatra, similar with Rails. I've referenced a lot of logging framework...
(1) odpowiedzi
2017-03-16 10:03 How do you run a basic sinatra app on cloud 9 »
I am using cloud 9 IDE to follow this tutorial. How can I run Sinatra on Cloud 9 ? I created a blank workspace in cloud 9, ran gem install from comman...
(1) odpowiedzi
2017-03-15 22:03 How to stop Event Machine in setup like this? »
I have a Sinatra app, overall configured like described here sinatra docs. It basically starts an event machine loop. Now, If I want to write a RSpe...
(1) odpowiedzi
2017-03-14 00:03 Ruby Sinatra textarea displays variable string instead of variable value »
I'm trying to set up a webapp using Sinatra, and I've got it working currently where the user can enter a list of URLs into a textarea, click submit, ...
(0) odpowiedzi
2017-03-13 02:03 Ruby + Sequel + Sinatra + MySQL connection issues »
Hi have a simple web app built in ruby, sinatra and sequel connected to a mysql DB. Im using Ubuntu 14.04.3 LTS ruby 2.0.0 gem 'sinatra', '1.4.5' gem...
(1) odpowiedzi
2017-03-12 04:03 Sinatra helper extensions/modules that can be used as static methods with namespaces? »
I want to write a helper extension that can be invoked using module's name, rather than directly as a DSL method in a classic Sinatra app. For exampl...
(0) odpowiedzi
2017-03-10 04:03 Elastic Beanstalk Database Pool Issue »
I recently decided to switch from Heroku to deploying directly to AWS through their Elastic Beanstalk service - hope my terminology is right still fig...
(0) odpowiedzi
2017-03-09 13:03 what is necessary for authentication to be secure »
I'm currently trying to get a grasp on Sinatra, and i noticed there is no up to date authentication gem like devise for rails. I decided to just creat...
(1) odpowiedzi
2017-03-08 04:03 Apply CSS style to flash message »
My app is based on Sinatra. I am using the sinatra-flash gem to generate flash messages if the user does not select enough items to compare. This as...
(1) odpowiedzi
2017-03-07 19:03 Setting up the Database on Heroku. bundler: failed to load command: thin , LoadError: cannot load such file -- dm-postgres-adapter »
so I'm trying to do some Sinatra tutorial (JUMP START SINATRA by Darren Jones - https://www.sitepoint.com/premium/books/jump-start-sinatra) And it wo...
(0) odpowiedzi
2017-03-06 06:03 Iteration over array of params in view »
I have a Sinatra app that I would like to have display a list of interactions between pairs of params. Right now I'm only allowing 2 selections but w...
(1) odpowiedzi
2017-03-05 18:03 Accept file upload (without a form) in Sinatra »
I have this Sinatra::Base code: class Crush < Sinatra::Base post '/upload' do erb params.inspect end end I am using Postman and its inte...
(1) odpowiedzi
2017-03-04 21:03 Layout paths not working in Sinatra »
Using Sinatra for the web framework and HAML for the pages, I have a layout file at /views/layout.haml. I also have javascript and css files in /publi...
(1) odpowiedzi
2017-03-04 13:03 Create a foreign key using belongs_to between two mongoid collections »
There are two classes. First class class Baby include Mongoid::Document field :first_name, type: String field :surname, type: String field :d...
(0) odpowiedzi
2017-03-04 03:03 Log out when using Digest MD5 »
I'm using HTTP Digest authentication as per the Sinatra recipies site here: #config.ru require File.expand_path '../main.rb', __FILE__ app = Rack...
(0) odpowiedzi
2017-03-02 14:03 Sinatra(Ruby) app does not transfer mp4 files correctly »
I got my routing here: get "/fortytwo" do send_file("42.mp4") end And my HTML for the page that shall play the video is as follows: <body>...
(1) odpowiedzi
2017-03-02 05:03 Using haml partial to loop through and display »
Using Haml and Sinatra, given an array, what is the best way to use a partial to show each element? For example, if I define a helper: #controller.r...
(1) odpowiedzi
2017-02-27 23:02 Can I use rack-test for deployment tests? »
I've built a simple api in Sinatra, with the purpose of setting up a deployment pipeline using Docker. I'm at a stage where I could easily switch Sina...
(1) odpowiedzi
2017-02-25 23:02 How to allow sinatra poll for data smartly »
I am wanting to design an application where the back end is constantly polling different sensors while the front end (sinatra) allows for this data to...
(1) odpowiedzi
2017-02-25 20:02 Download a csv file from ftp with ruby sinatra »
I have some ruby code that I'm using to download a csv file from an FTP server. However, right now but it's not working and not showing any error me...
(1) odpowiedzi
2017-02-25 10:02 How to add "Access-Control-Allow-Origin" headers to API Response in Ruby »
I'm interviewing for a front-end developer job and have been given a coding test to build a simple front-end interface. I've been given the server, w...
(1) odpowiedzi