Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9219447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:07:09+00:00 2026-06-18T03:07:09+00:00

Question I want to be able to debug my Sinatra website hosted by Thin

  • 0

Question

I want to be able to debug my Sinatra website hosted by Thin on my local machine, and I want to be able to initiate this by using rake.

I’m not able to accept answers suggesting the use of different technologies (e.g. Windows, Rails, Java) or other servers (e.g. unicorn, passenger, puma); however, if what I’m asking for is impossible, then I will accept that answer.

What I’ve tried

My current Rakefile contains a task :start which starts the Thin server, but when it hits the breakpoint no output is displayed on my terminal. If I start Thin directly from the terminal, then I see the (rdb:1) prompt when it hits the breakpoint as expected. In either case, the Thin server is correctly running the site (confirmed by commenting out the breakpoint).

Gemfile

source :rubygems
gem 'sinatra'
gem 'thin'
gem 'debugger-pry'

Rakefile

task :start do
  conf = File.expand_path('config.ru', File.dirname(__FILE__))
  `thin -e development -R #{conf} --debug start`
end

config.ru

require File.expand_path('app', File.dirname(__FILE__))

run ModularExample::App.new

app.rb

require 'sinatra'
require 'debugger/pry'

module ModularExample
  class App < Sinatra::Base
    get '/' do
      debugger
      "Hello, world"
    end
  end
end
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T03:07:10+00:00Added an answer on June 18, 2026 at 3:07 am

    You’re not outputting to STDOUT. The backticks execute the command and return the output as a string so you could do something like

    puts `thin -e development -R #{conf} --debug start`
    

    but you want to stream the processes output to STDOUT so you actually want to do:

    task :start do
      conf = File.expand_path('config.ru', File.dirname(__FILE__))
      exec("thin -e development -R #{conf} --debug start")
    end
    

    Learn more about calling command line calls from this question.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This was my original question: I want to be able to open a pdf
Simple question: I want to be able to pass options into my sinatra app
Similar Stack Overflow Question I want users to be able to search through my
SharePoint newbiew question, I have installed SharePoint 2010 and want to be able to
There are actually 2 question i want to cover in this topic. 1) Is
Well this is a simple question i want to filter two elements sorted reverse
My Question: I want to be able to change the brightness of a resource
So it's another n-dimensional array question: I want to be able to compare each
I am not able to debug asp.net application in asp.net 2.0 Whenever I hit
I have created a maven android project using this archetype . I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.