Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
0 answers
16 views

Issue with Psych::DisallowedClass Exception when using reify in PaperTrail with Sinatra

I am working on a Ruby project using Sinatra version 3.0.6 and Ruby version 3.0.0. I am using the PaperTrail gem (version 15.1.0) to track changes in my models for auditing and version control ...
xmarston's user avatar
  • 863
1 vote
1 answer
111 views

How to use Rack::RewindableInput::Middleware in a Sinatra Ruby app?

This is the code that works just fine: require 'sinatra' post '/foo' do "Equals to #{params[:a]}!" end If I send POST request, it returns all right: $ ruby foo.rb -p 8888 $ curl -X POST -...
yegor256's user avatar
  • 104k
1 vote
1 answer
53 views

Cannot get request body from form in Sinatra

I have a form submission in Sinatra that's not showing any received params. Chrome is showing the form submission payload as proper, so the form is fine. It's just not making it through to Sinatra ...
Rich_F's user avatar
  • 1,976
0 votes
1 answer
42 views

Sinatra doesn't parse Slack interactive content payload

I'm trying to use Slack interactive content to send the response of a button into a Sinatra app but the body doesn't get de-serialized. Whenever I try to use the Slack message button I receive this ...
Alvaro's user avatar
  • 39
0 votes
1 answer
110 views

How to pass an instance variable to a erb template in a Sinatra route? [closed]

How do I pass an instance variable to an erb template in a Sinatra route. The below doesn't work. get '/' do @beercompany = "Coors" erb :mytemplate end mytemplate....
Leahcim's user avatar
  • 41.2k
0 votes
1 answer
64 views

how to configure Sinatra to accept more option parameters?

I'm using Sinatra for a desktop app that runs on local host. When I start it up, I want to pass it an option like this ruby mysinatra.rb -first_name="My Name" However, I keep getting invalid ...
Leahcim's user avatar
  • 41.2k
0 votes
0 answers
38 views

how to find missing indices in mysql using rspec? [duplicate]

I need to identify missing indices in mysql before deploy to production. For example, analyze rspec test. My stack: sinatra sequel gem mysql It is preferable ORM-agnostic solution or for sequel ORM ...
gayavat's user avatar
  • 19.3k
3 votes
2 answers
397 views

Fixing DEPRECATION WARNING: Calling ActiveRecord::Base.clear_active_connections

I'm working on a Ruby Sinatra app with Active Record and it gets this error message printed in the console with every HTTP call. I couldn't find anywhere more information about this deprecation or how ...
Alvaro's user avatar
  • 39
0 votes
0 answers
49 views

Overwrite rake tasks in sinatra project and activerecord

I have a Sinatra fun project and I want to improve my rake tasks so that everytime I create a new migration and migrate it I don't have to manually run them with RACK_ENV=test bundle exec rake db:...
jedi's user avatar
  • 2,121
0 votes
0 answers
102 views

Ruby/Sinatra - Cloudrun deploy passing '--source' option to ruby

I'm new to Cloudrun, attempting to deploy a Sinatra app. I've gone through the documentation, but can't figure out why '--source' keeps getting passed in. Haven't left it in the app itself, I figure ...
bjorn's user avatar
  • 175
0 votes
0 answers
78 views

Application sent EOF before finishing response headers resulting in 502

We're running 2 Sinatra apps side-by-side on phusion passenger + nginx on an admittedly EOL version of ruby using the Docker image phusion/passenger-ruby27:2.5.0. We're using memcached-backed sessions ...
user3286042's user avatar
0 votes
1 answer
91 views

How to evaluate Ruby code in Haml as a varaible

I was playing with ruby evaluation in haml. It doesn't work if i pass a variable to the haml template. it only works if the ruby code is already inside the template (not passed as variable), I'm ...
fooBar's user avatar
  • 412
1 vote
0 answers
43 views

Asian url redirection

I am trying to setup a redirection of URLs that contain Korean or Japanese characters to their English counterparts in a Sinatra application (ruby). Instead of a 301, I get a 404 response. Example: ...
pixeline's user avatar
  • 17.8k
0 votes
1 answer
96 views

How to retrieve full referring URL in Sinatra?

My app is written in Ruby on a Sinatra framework. One of the functions in my app displays javascript code. That javascript code is called by remote websites. In Ruby, I need to know the full URL of ...
Evan Appleby's user avatar
0 votes
1 answer
94 views

Sinatra On Kubernetes - Moved app to subdirectory, app assets fail to render in production (404) but work locally

My code: https://github.com/nullset2/smbdxfortunes Hi. My setup is as follows: Sinatra app Ruby 2.7 Kubernetes 1.17 Traefik Ingress as "Reverse proxy" I originally had this application ...
Alfredo Gallegos's user avatar

15 30 50 per page
1
2 3 4 5
281