Data dodania Pytanie
2017-12-27 20:12 connection timeout in browser when running external script via ssh »
I have a sinatra web app that has a form. The user provides an input in the form of a string. When the user clicks the submit button the web server in...
(0) odpowiedzi
2017-12-25 22:12 Sinatra API app is truncating a large JSON response »
I have a simple API Sinatra app that I'm running with: bundle exec rackup config.ru I'm using the API to return a large JSON payload to initial a d...
(0) odpowiedzi
2017-12-21 02:12 How can I send messages to specific client using Faye Websockets? »
I've been working on a web application which is essentially a web messenger using sinatra. My goal is to have all messages encrypted using pgp and to ...
(1) odpowiedzi
2017-12-20 17:12 Sinatra - A part of a cookie is missing »
I'm using the framework Sinatra and I created a cookie with two variables: a username and an expire time, as follows: logged = response.set_cookie(:l...
(1) odpowiedzi
2017-12-19 10:12 Information panel using Ruby Sinatra streaming »
I'm building an information panel thats with an interval shows pictures on a big screen. I could use javascript timeout that requests a new picture ev...
(0) odpowiedzi
2017-12-16 17:12 Sinatra SSL POST route not found »
I have sinatra app. Nginx+PAssenger on server. When I setup ssl for this app, I cannot use ajax post requests. Im getting 404 not found error everyti...
(0) odpowiedzi
2017-12-13 19:12 How can I get Sinatra to store the last request made to it »
This is a bit of a weird question, but I'm trying to write a custom mocking library using Sinatra. I'd very much like my library to be able to store t...
(1) odpowiedzi
2017-12-13 17:12 Having an issue with Dialogflow API WebhookResponse V2 for Actions for Google »
I'm testing Actions for Google, so I created some simple Sinatra application which looks something like: require 'sinatra' require 'json' ...
(1) odpowiedzi
2017-12-13 12:12 NoMethodError: undefined method `configure' for main:Object on sinatra project »
So I was following this good-if-rather-old tutorial on setting up a postgres db with Sinatra: http://mherman.org/blog/2013/06/08/designing-with-class-...
(0) odpowiedzi
2017-12-11 08:12 Rake task to print the data of premium users created_at in the last 4 weeks »
I need to print out the information of users created in last 4 weeks(28 days). How to do that? ...
(0) odpowiedzi
2017-12-10 06:12 create non-persistent cookie in sinatra »
I want to use non-persistent cookies in a Sinatra app, i.e. a cookie that is deleted by the browser at the end of the session. My understanding is tha...
(0) odpowiedzi
2017-12-09 04:12 Kaminari pager not working with Sinatra and Mongoid? »
Can't get Kaminari to work with Sinatra and Mongoid. I'm getting this error: NoMethodError at /api/events undefined method `page' for #<Mongoid::...
(0) odpowiedzi
2017-12-08 21:12 Sinatra - values disappearing between route and view »
I am using jquery / ajax to pass into a route two variables (from a slider), min and max. At this point I just want the values and while I can see th...
(0) odpowiedzi
2017-12-07 23:12 How do I share Redis key/values across multiple instances with rackup/Sinatra? »
I'm trying to use Redis as my session store, which seem to work just fine. However I can't figure out how to let multiple instances of Sinatra access ...
(0) odpowiedzi
2017-12-07 07:12 How to use Ruby Sinatra + ActiveRecord to read .sql file and extract the content? »
I'm familiar with Sinatra but I am completely new to ActiveRecord and Database stuff, I'm trying to use ActiveRecord from a .sql file full of data wit...
(0) odpowiedzi
2017-12-06 20:12 how do i save large amount of data into DB using DataMapper »
Im trying to insert into the database but sinatra throws this error DataObjects::ConnectionError at / database is locked at line Name.create(babyna...
(0) odpowiedzi
2017-12-06 16:12 Oj gem: incompatible library version »
I'm trying to start up an application in localhost made it with Sinatra and after running bundle install I got the following error: /home/diego/.r...
(1) odpowiedzi
2017-12-04 11:12 selecting one check box per row »
I want the user to only select one student per row I have this for loop to dynamically create rows in a table: for(let i = 0; i<<%=Voter.websi...
(0) odpowiedzi
2017-12-03 21:12 display page in iframe »
post '/uploadZIP' do zipFile = params['zip'][:filename] if zipFile.end_with? '.zip' File.open(params['zip'][:filename], 'w') do |f| f.write(para...
(0) odpowiedzi
2017-12-03 06:12 open zip file using rubyzip »
def extract_zip(file, destination) FileUtils.mkdir_p(destination) Zip::ZipFile.open(file) do |zip_file| zip_file.each do |f| file_path = File....
(0) odpowiedzi
2017-12-02 22:12 How to display websites in iframe »
I am using ruby and sinatra. I need to create a website that allows the user to upload a zipfile of other websites and display all of them in multiple...
(0) odpowiedzi
2017-12-02 02:12 How to keep a Sinatra cookie value as an integer »
I set the cookie using an integer cookies[:which_link] ||= 0 It seems to convert it from an integer to a string, because there are no complaints. ...
(1) odpowiedzi
2017-12-01 21:12 Ruby Savon - Parse XML string »
I have exhausted google on this subject and I just can't seem to get it right.. I have the following XML payload returned from Savon: <?xml ver...
(1) odpowiedzi
2017-12-01 03:12 Post Request from client With Proper Headers Always return 401- UnAuthorized »
Am a newbie to ruby. I am trying to invoke a REST API from ruby code. I have tried the code with both as standalone ruby code and inside a application...
(0) odpowiedzi
2017-11-30 15:11 How to save item in DataMapper database in to a CSV and download it to the browser using Ruby/Sinatra? »
I am currently using Ruby and Sinatra. I have a DataMapper DataBase. When the user clicks a button asking for a report of the DB contents, I want to...
(0) odpowiedzi
2017-11-30 09:11 Parsing JSON ruby in XML »
Script iterate through table "orders", but problem with row 'cart': there are JSON arrays in DB. orders = 10 doc = Nokogiri::XML::Builder.ne...
(0) odpowiedzi
2017-11-29 04:11 ActiveRecord 'where not' and 'where' in same query »
I would like to build a 'waiting_on' list where the users in the list meet two conditions: they do not belong to the current auction (User.where.not(a...
(1) odpowiedzi
2017-11-28 20:11 Add usernames to database »
I have this line in an .erb file to get the input of the username <input type="text" placeholder="User Name" name="user[username]" value="<%#{@...
(0) odpowiedzi
2017-11-27 21:11 Supporting Multiple Cookie Domains with Rack::Session:Cookie and Sinatra »
We have a customer that we support on a subdomain of our mains site like this: them.us.com What they want is something.them.com We're using Rack...
(0) odpowiedzi
2017-11-27 03:11 Sprockets Assets not compiled when visiting with Sinatra »
The issue I'm having is that the generated asset path does not point to anything -- my project directory doesn't change / sprockets doesn't build / co...
(1) odpowiedzi
2017-11-24 19:11 Using Ruby and Sinatra, Is it possible to use HAML in an "internal" or "inline" manner? »
I've done gem install sinatra and gem install haml And I have this .rb file require 'sinatra' get '/abc2' do "<b>aaaaaaaaaaaaa</b>" en...
(2) odpowiedzi
2017-11-23 23:11 Query array in sinatra with mongodb »
I'm trying to show my data with a filter in Sinatra from my mongodb. One of the parameters is an array, and it's not working. I read that to query an ...
(1) odpowiedzi
2017-11-23 13:11 ActiveRecord has_many :through doesn't assign value through »
I am working with a song, genre and artist model. The classes look like below: class Genre < ActiveRecord::Base has_many :song_genres has_...
(1) odpowiedzi
2017-11-23 13:11 Sinatra: pass nested routes to controllers »
What I try to achieve with Sinatra is, I think fairly simple issue. I have a bunch of controllers (coming from the Rails world) and I run them from my...
(1) odpowiedzi
2017-11-22 15:11 Clearing cache in rspec of Sinatra app »
I would like to clear the cache in the middle of one of my specs. Is there an easy way of this being done? Thanks ...
(0) odpowiedzi