Data dodania Pytanie
2017-05-31 11:05 Sinatra Multiple Parallel Requests Variable Behaviour »
I am fairly new to ruby and would like to understand how class instance variables behave in case of multiple parallel requests. I have a method insid...
(1) odpowiedzi
2017-05-31 03:05 Tracking wins & losses with PSQL/DataMapper »
I have a User class which allows people to register and play a game; I also have a Game class, which contains the logic of said game (RPS). When peop...
(1) odpowiedzi
2017-05-30 23:05 How to have my google oauth only try and authorize the app on a certain route »
I have a google Oauth that will make the user authorize when a user goes to my webpage, however I only want them to have to authorize the app so that ...
(0) odpowiedzi
2017-05-30 00:05 How do I use Ruby, Sinatra, Mithril.js, Postgresql and Stripe to build SAAS application on Ubuntu? »
I am deploying an application written in Ruby which uses Mithril.js as SPA framework, Sinatra web server, Stripe for accepting payments and Postgresql...
(0) odpowiedzi
2017-05-26 14:05 How to integrate template from Themeforest to Rails or Sinatra? »
Hi I need a tutorial on how to integrate this HTML template to Rails or Sinatra. This is the the template: https://themeforest.net/item/olympus-htm...
(0) odpowiedzi
2017-05-26 00:05 Cannot install hashids gem on (ruby/sinatra) »
I installed hashids gem as instructed here: https://github.com/peterhellberg/hashids.rb However, when I try to use the Hashids class it shows me an e...
(1) odpowiedzi
2017-05-23 13:05 Sinatra use thin webserver, how to make it show get "request-url" »
In default sinatra webserver webrick, in dev mode, I can get following in stdout: 127.0.0.1 - - [23/May/2017:19:23:10 CST] "GET / HTTP/1.1" 200 4 - -...
(2) odpowiedzi
2017-05-19 10:05 Sinatra server not working »
I've been working on the Odin Project and am currently working on the Sinatra portion. I have things working on my work computer, but just tried to g...
(0) odpowiedzi
2017-05-17 21:05 500 Internal Server Error Trying to Send an SMS using Twilio »
Using Heroku to host a Sinatra app. I have a route that's supposed to send an SMS. It returns a 500 internal server error instead. Everything works p...
(1) odpowiedzi
2017-05-17 19:05 500 error when providing resque-web a redis connection string »
I'm using Resque in my sinatra app so I can query an API and then send an email with some results all in a background worker process. Everything curr...
(0) odpowiedzi
2017-05-17 14:05 ActiveRecord::NotNullViolation with AR 5.1 and Sinatra 2 »
we are using: gem 'sinatra', '~> 2.0.0' gem 'activerecord', '~> 5.1.1' gem 'sinatra-activerecord', '~> 2.0.13' The thing is that with Acti...
(1) odpowiedzi
2017-05-15 18:05 How to properly manage inputs in a Sinatra web page »
I am working on a super simple Sinatra app for demo purposes and I am wondering if there is a better way to implement it. The ruby program is super ...
(1) odpowiedzi
2017-05-14 19:05 How to document a Padrino application using Yard? »
I'm using Padrino 0.14.0.2 - which builds on top of Sinatra 2.0.0 - as well as ActiveRecord 5.1.1 and RSpec 3.6.0 gems. How do I generate (meaningfull...
(0) odpowiedzi
2017-05-14 17:05 Can't launch Sinatra app on Apache »
So I have a sinatra app that runs fine on my local machine. The directory structure is: ├── Gemfile ├── Gemfile.lock ├── Rakefile ...
(0) odpowiedzi
2017-05-11 09:05 Sinatra - How to open a bootstrap modal from a redirect »
How would I go about automatically opening a modal in the layout.erb after I redirect back from a POST method? Cart modal opens from button click: ...
(1) odpowiedzi
2017-05-10 19:05 HTML form to MongoDB via Ruby »
I am trying to learn a new skill, just as a hobby, and while I've learned a lot, there are still things that I get confused on - and this is one of th...
(2) odpowiedzi
2017-05-10 15:05 'will_paginate undefined method' in views but not controller - Sinatra 2.0, ActiveRecord 5.0 »
I added the will_paginate gem as outlined in the gem installation for Sinatra. I never get a 'no method error' inside the controller, but in the rout...
(1) odpowiedzi
2017-05-10 14:05 Sinatra and PostgreSQL - running the entire database and app »
I have been struggling with rerunning my apps from MAC OS to my windows OS. I have never liked databases. Anyway, the thing is that I cannot even loa...
(1) odpowiedzi
2017-05-08 21:05 Issues with axios POST requests (javascript) and Sinatra/Base API (ruby) »
I keep getting issues with attempting POST requests to my Ruby Sinatra/Base API using the javascript library axios I have an example POST route in my...
(0) odpowiedzi
2017-05-08 15:05 Shopify Javascript API return products list from ScriptTag »
Im trying to build a Shopify app that adds some html to the storefront to query for product information. I have my JS loaded from a ScriptTag and now ...
(0) odpowiedzi
2017-05-08 15:05 Running a ruby sinatra postgreSQL error »
I have been trying to run my ruby app that previously was run on my MACbook. Currently, I am using a Windows OS and bash. PostgreSQL is installed. So ...
(0) odpowiedzi
2017-05-05 22:05 Getting an error when try to do Heroku run rake db:migrate »
I am making small Sinatra app and trying to put it on Heroku server. when I do Heroku run rake db:migrate, Heroku is giving error "Gem::LoadError: Sp...
(1) odpowiedzi
2017-05-05 01:05 heroku deploy with Ruby & Sinatra: application error »
I'm trying to deploy to Heroku and can't get past this error message: "Application Error" An error occurred in the application and your page cou...
(0) odpowiedzi
2017-05-05 00:05 Re-use "controller" code in sinatra »
Like rails routes resources, I am looking to make a sinatra application share the same code between different routes. For example, in a company, we ...
(0) odpowiedzi
2017-05-04 05:05 navbar-right is not responding in bootstrap navigation »
I am trying to create a small Sinatra app. Currently, trying to set up a conditional navigation bar with the help of bootstrap. I am trying to use nav...
(1) odpowiedzi
2017-05-02 11:05 How can we render a random partial in a Slim template within a Sinatra application? »
Given a really simple Sinatra application: require 'sinatra' require 'slim/include' get '/' do @specifically = %W(milk bread cheese).sample slim...
(1) odpowiedzi
2017-04-28 21:04 Testing classic Sinatra application with Cucumber »
I am trying to test my Sinatra application with Cucumber and am having trouble. This question references testing a modular Sinatra application with c...
(0) odpowiedzi
2017-04-27 19:04 How to upload multiple files via Sinatra and avoid NoMethodError - undefined method `read' for "#<File:0x0000000xxxxxx0>":String »
I'm trying to upload the nth file from a multi-file array: post '/upload2' do puts params #pp params mx=params['images'].map{|f| f[:filename] }...
(2) odpowiedzi
2017-04-27 00:04 Return filtered records from a returned set of data from two tables »
I have three tables: - Venue - Space (belongs to Venue) - Included Space (belongs to Space) I receive the id of a Venue in the route and return all t...
(1) odpowiedzi
2017-04-26 11:04 Mysterious error deploying sinatra app to heroku: bundler: failed to load command: rackup »
I noticed that heroku is producing a mysterious error when I deploy my sinatra app. It works fine locally, and in fact, it runs fine on heroku as well...
(1) odpowiedzi
2017-04-20 19:04 Detect browser in Sinatra »
I need to know (on .rb/.haml level) if device is mobile or if browser is not supported. I don't want (or it won't work well for my need) to parse user...
(1) odpowiedzi
2017-04-19 22:04 How to return a JSON response from a before block »
I am writing a Sinatra-based API, and want to protect certain endpoints with an API key, validating the key before the route is processed. I understa...
(2) odpowiedzi
2017-04-19 08:04 How used consoled log to ajax param? »
Im trying to use this console log $.post("greeting", { salutation: console.log(5 + 6), name: "Friend" }, to ajax param salutation but not works H...
(1) odpowiedzi
2017-04-19 01:04 How to add data to returned ActiveRecord query records »
I'm doing a simple query to a database table to send off to an external service, but I need to add an element to each of the returned records before I...
(1) odpowiedzi
2017-04-18 17:04 Sinatra event triggered by Rufus Scheduler »
Trying to send an event from within Rufus Schedulers results in this error: { 70231586340180 rufus-scheduler intercepted an error: 70231586340180 ...
(1) odpowiedzi