New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create sinatra gem fails on rack-protection #1110

Closed
tigernassau opened this Issue Apr 22, 2016 · 5 comments

Comments

Projects
None yet
3 participants
@tigernassau

tigernassau commented Apr 22, 2016

First, sinatra is our favorite and hope for Sinatra 2.0 - we gave up on sinatra 1.4.7 due to problems with rack-protection - froze button links to forms

cloned sinatra/sinatra master
tried to create gem - failed => dependency error rack (>=0) requested by rack-protection
So tried:
gem install rack --pre => rack 2.0.0 alpha
build sinatra/rack-protection gem
=> same error

@zzak

This comment has been minimized.

Show comment
Hide comment
@zzak

zzak Apr 22, 2016

Member

Thanks for the report, I will look into it.

Any chance you could send a full backtrace of the error?

Also, which problems did you have with rack-protection?

Member

zzak commented Apr 22, 2016

Thanks for the report, I will look into it.

Any chance you could send a full backtrace of the error?

Also, which problems did you have with rack-protection?

@tigernassau

This comment has been minimized.

Show comment
Hide comment
@tigernassau

tigernassau Apr 22, 2016

On 04/22/2016 03:10 AM, Zachary Scott wrote:

Thanks for the report, I will look into it.

Any chance you could send a full backtrace of the error?

Also, which problems did you have with rack-protection?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#1110 (comment)

sorry, but how is a backtrace run ?

re: rack-protection - on development machine had no problem, but when
loaded on server, any link that would open a simple html form (ie login,
signup,) the form would not appear - the link click would just not work

  • trial and error showed it was csrf related. now we had included
    rack/protection in our app file - is that necessary or is it built into
    sinatra ? if we removed the rack/protection then links and forms worked
    fine (but not sure if protected from csrf) - our guess is there is a bug
    in the csrf protection

tigernassau commented Apr 22, 2016

On 04/22/2016 03:10 AM, Zachary Scott wrote:

Thanks for the report, I will look into it.

Any chance you could send a full backtrace of the error?

Also, which problems did you have with rack-protection?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#1110 (comment)

sorry, but how is a backtrace run ?

re: rack-protection - on development machine had no problem, but when
loaded on server, any link that would open a simple html form (ie login,
signup,) the form would not appear - the link click would just not work

  • trial and error showed it was csrf related. now we had included
    rack/protection in our app file - is that necessary or is it built into
    sinatra ? if we removed the rack/protection then links and forms worked
    fine (but not sure if protected from csrf) - our guess is there is a bug
    in the csrf protection
@zzak

This comment has been minimized.

Show comment
Hide comment
@zzak

zzak May 9, 2016

Member

@tigernassau Can you give me step-by-step to reproduce the exception?

For example:

  1. git clone https://github.com/sinatra/sinatra
  2. cd sinatra
  3. gem build sinatra.gemspec

I think this is what you're trying based on your report, and I'm not able to reproduce any errors this way. So please explain if I'm doing something wrong.

Re: rack-protection, I need a little more information such as:

  • What code are you trying to run
  • For the app as well as the form
  • Where the images are coming from

This will help build a picture of how you're using rack-protection and where the issue might be.

Thanks!

Member

zzak commented May 9, 2016

@tigernassau Can you give me step-by-step to reproduce the exception?

For example:

  1. git clone https://github.com/sinatra/sinatra
  2. cd sinatra
  3. gem build sinatra.gemspec

I think this is what you're trying based on your report, and I'm not able to reproduce any errors this way. So please explain if I'm doing something wrong.

Re: rack-protection, I need a little more information such as:

  • What code are you trying to run
  • For the app as well as the form
  • Where the images are coming from

This will help build a picture of how you're using rack-protection and where the issue might be.

Thanks!

@atstockland

This comment has been minimized.

Show comment
Hide comment
@atstockland

atstockland Jul 26, 2016

I just ran into this same problem. I already have rails 5 with Sinatra 1.4.4 successfully running. However, if I run "bundle outdated" or "bundle update" I get the following error:

//---------------------
Bundler could not find compatible versions for gem "rack-protection":
In Gemfile:
sinatra was resolved to 2.0.0.pre.alpha, which depends on
rack-protection (~> 2.0)

Could not find gem 'rack-protection (~> 2.0)', which is required by gem 'sinatra', in any of the sources.
//---------------------

bundle works with "gem 'sinatra', github: 'sinatra'". However, the same error as above occurs if I change it to "gem 'sinatra', '~> 1.4', '>= 1.4.7'".

atstockland commented Jul 26, 2016

I just ran into this same problem. I already have rails 5 with Sinatra 1.4.4 successfully running. However, if I run "bundle outdated" or "bundle update" I get the following error:

//---------------------
Bundler could not find compatible versions for gem "rack-protection":
In Gemfile:
sinatra was resolved to 2.0.0.pre.alpha, which depends on
rack-protection (~> 2.0)

Could not find gem 'rack-protection (~> 2.0)', which is required by gem 'sinatra', in any of the sources.
//---------------------

bundle works with "gem 'sinatra', github: 'sinatra'". However, the same error as above occurs if I change it to "gem 'sinatra', '~> 1.4', '>= 1.4.7'".

@zzak

This comment has been minimized.

Show comment
Hide comment
@zzak

zzak Jul 27, 2016

Member

@atstockland Sorry for your trouble.

Until the gem is released you will also have to add the following to your Gemfile:

gem 'rack-protection', github: 'sinatra/rack-protection'

Good luck!

Member

zzak commented Jul 27, 2016

@atstockland Sorry for your trouble.

Until the gem is released you will also have to add the following to your Gemfile:

gem 'rack-protection', github: 'sinatra/rack-protection'

Good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment