Data dodania Pytanie
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
2017-02-23 21:02 SQL combine WHERE and ORDER BY in one statement »
I have a problem with my database request(I use Sinatra for Ruby). There's a database where I store some articles with their attributes like the price...
(0) odpowiedzi
2017-02-23 02:02 how do I troubleshoot Rack::Session::Cookie after decrypting nothing looks wrong with it? »
I keep getting an error when passing parameters to a POST route telling me Warning! Rack::Session::Cookie data size exceeds 4K. Warning! Rack::Sessi...
(0) odpowiedzi
2017-02-21 08:02 Issue using .erb to display date with Sinatra »
I am using ruby .erb to display time in a div's span. However using something similar for date does not work. <div id="comment_space"> <% ...
(1) odpowiedzi
2017-02-21 08:02 configure sinatra as a server »
I have written an app in ruby using sinatra. the app works fine and I am testing the post/get request using postman. Right now I start the app using ...
(2) odpowiedzi
2017-02-21 06:02 How can I separate templates by data in jbuilder »
I want to make following data with jbuilder. How can I make jbuilder separated? data: [{ type: "top" logo: "logo.png" title: "title" },{ ty...
(0) odpowiedzi
2017-02-20 10:02 Connecting to cloudant NoSQL database from ruby »
I have trouble connecting to my cloudant NoSQL database hosted on bluemix with couchrest_model library. I have similar code written in ruby which wor...
(2) odpowiedzi
2017-02-16 06:02 Unable to test delayed job from Rspec »
I have a sinatra app where I use delayed jobs to run log running jobs in my application. I want to test my application with rspec. Below is my app.rb ...
(0) odpowiedzi
2017-02-15 19:02 Sending a delete request to the url in an anchor tag »
How would I send a delete request to the specified URL (in the href attribute). <a href="/apartments/<%= @apartment.id %>">Delete</a&...
(1) odpowiedzi
2017-02-15 14:02 `Sequel::Error: mismatched number of keys` when migration run from rake »
I have a Sinatra app using Sequel and a rake task to perform migrations. When I run rake db:migrate I get the following error: rake aborted! Sequel::...
(1) odpowiedzi
2017-02-14 04:02 mysql Databases how can I fix this? »
Hi Im trying to set up a database to store emails using ruby, sinatra, ActiveRecord, and mysql. Any suggestions on what im doing wrong? Im trying to o...
(0) odpowiedzi
2017-02-13 12:02 How can i setup puma ssl_blind parameter, outside of config/puma.rb file, using sinatra as framework? »
Why i need this? Because i will pass dynamically to the application, the port and the ip address that will be use. Inside config/puma.rb it is workin...
(0) odpowiedzi