Data dodania Pytanie
2017-06-16 20:06 Why is my layout change not reflecting in a Sinatra/Puma/Nginx production setup? »
I have a website running Sinatra and Puma with Nginx proxying traffic via an upstream to the Sinatra app. Now I have made a change in one of the view...
(1) odpowiedzi
2017-06-16 18:06 Can't seem to run a process in background of Sinatra app »
I'm trying to display a number from an api, but I want my page to load faster. So, I'd like to get the number from the api every 5 minutes, and just l...
(1) odpowiedzi
2017-06-16 01:06 Sinatra Page Not Loading Properly »
I am trying to learn Sinatra. I wrote a script to scrape the job listings from Craigslist and list them on my page (just as an exercise). The output ...
(0) odpowiedzi
2017-06-14 05:06 Why does this code throw an error when used inside the controller, but not the view? »
I have the following model: class User include DataMapper::Resource property :id, Serial property :name, String, required: true property :em...
(1) odpowiedzi
2017-06-13 11:06 Sinatra: Array from JSON into HTML table »
I am new to coding. I work on a project where I get the details from JSON, so created arrays. I want to put the details into an HTML table. Arrays a...
(1) odpowiedzi
2017-06-10 05:06 Sinatra endpoint is working perfectly on localhost, but not found in production? »
I have a weird issue i'm unable to troubleshoot, I get a 404 response body of <h1>Not Found</h1> from my sinatra API when deployed on h...
(1) odpowiedzi
2017-06-08 17:06 How can I check that my automatic deployment worked correctly? »
I'm deploying a sinatra application automatically via git hooks. What are some general tests I can run during deployment to make sure deployment goes ...
(0) odpowiedzi
2017-06-06 21:06 Why does my google refresh token show up locally when i run my app but not on heroku »
I have an app that requires users to sign in with google for I can get their access token and refresh token, when i run it locally I am able to get th...
(0) odpowiedzi
2017-06-05 18:06 Application Error on Sinatra app deployed on Heroku »
I have built an app in a course I was taking in Cloud 9 using the Sinatra framework and deployed it using Heroku. However when I launch the app I get ...
(0) odpowiedzi
2017-06-04 23:06 JavaScript will not run at all »
I have this template as my sinatra layout.erb <!DOCTYPE html> <html> <head> <title>Invoicer</title> <link re...
(1) odpowiedzi
2017-06-04 19:06 Sinatra force logged in on controller »
I have a helper defined in helpers/loggedin.rb that has a function called logged_in? which checks if a user is logged in or not. is there any way I ca...
(1) odpowiedzi
2017-06-03 07:06 Sinatra class instance variable for parallel requests »
I have a method inside my controller class which is called everytime for each request for a specific operation (create in this case) class DeployP...
(0) odpowiedzi
2017-06-02 18:06 Use Sinatra redirect in ternary operator »
Does any one know why saved ? redirect '/success' : erb :signup Throws the following error: syntax error, unexpected ':', expecting keyword_end ...
(0) odpowiedzi
2017-06-01 23:06 Sending JSON Webhook Response »
I'm trying to receive a request from a webservice via JSON and send a successful response message back if the token is correct along with some other i...
(1) odpowiedzi
2017-06-01 05:06 Adding new div to row causes wrapping »
I have some problems with divs in a Bootstrap row wrapping when I don't want them to. I'm designing a Mastermind game (Sinatra/Ruby/JS, for educationa...
(2) odpowiedzi
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