fortuity / rails3-mongoid-devise

Deprecated. Use the new version at https://github.com/RailsApps.
285 stars 27 forks source link

"redirection forbidden" error when using application generator #6

Closed lgs closed 13 years ago

lgs commented 14 years ago

applying the template I get this error:

redirection forbidden: http://github.com/fortuity/rails3-mongoid-devise/raw/master/template.rb -> https://github.com/fortuity/rails3-mongoid-devise/raw/master/template.rb (RuntimeError)

here is the full stack http://pastie.org/1305919

fortuity commented 14 years ago

I've investigated the issue and I've entered a GitHub support ticket. Recently GitHub rolled out SSL for access to all GitHub pages and attempts to access via HTTP are redirected to HTTPS URL equivalents. Subsequently, it is no longer possible to generate a new Rails application using a GitHub-hosted application generator template. I've confirmed that the issue is not confined to my own application generator template. The same issue arises when using another template, such as the example in Ryan Bates's App Templates in Rails 2.3. It seems that this issue results from Rails implementation issues apparently because 'open-uri' does not accommodate redirects from HTTP to HTTPS. Changing the template URL to specify HTTPS instead of HTTP apparently won't work because the Rails builder accepts only URLs beginning with "http" as a remote source. I will update as I learn more.

fortuity commented 13 years ago

I've updated the README documentation and tutorial to note this issue. There's a patch in Rails edge that allows the template URL to specify HTTPS. It should be released in Rails 3.0.4.

fortuity commented 13 years ago

Rails 3.0.4 is out and the issue is resolved.