Skip to content
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

Gemfile: syntax error, unexpected tIDENTIFIER, expecting keyword_end - "https://github.com/ #260

Closed
tomelam opened this issue Dec 30, 2016 · 6 comments

Comments

@tomelam
Copy link

tomelam commented Dec 30, 2016

This happens whether I say y or n to the 'Create a GitHub repository?' option question. When Rails Composer subsequently runs 'bundle install', an error occurs.


THIS OUTPUT SHOWS PART OR ALL OF THE PROBLEM:

      extras  recipe stage three
      extras  recipe creating GitHub repository
         run    hub create mashweb_9 from "."
Updating origin
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
error: Could not fetch origin
         run    hub push -u origin master from "."
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

HERE IS OTHER OUTPUT THAT MIGHT SHOW THE PROBLEM:

         run  bundle install

[!] There was an error parsing `Gemfile`: syntax error, unexpected tIDENTIFIER, expecting keyword_end -   "https://github.com/
        ^
/Users/tom/Sites/mashweb.2/Gemfile:4: unknown regexp options - gthb
/Users/tom/Sites/mashweb.2/Gemfile:5: syntax error, unexpected keyword_end
/Users/tom/Sites/mashweb.2/Gemfile:50: syntax error, unexpected end-of-input, expecting keyword_end. Bundler cannot continue.

 #  from /Users/tom/Sites/mashweb.2/Gemfile:4
 #  -------------------------------------------
 #    repo_name = "
 >    "https://github.com/
 #  end
 #  -------------------------------------------

HERE IS THE GENERATED README:

Mashweb 4
================

Rails Composer is supported by developers who purchase our RailsApps tutorials.
Need help? Ask on Stack Overflow with the tag 'railsapps.'
Problems? Submit an issue: https://github.com/RailsApps/rails_apps_composer/issues
Your application contains diagnostics in this README file.
Please provide a copy of this README file when reporting any issues.


option  Build a starter application?
choose  Enter your selection: [none]
option  Get on the mailing list for Rails Composer news?
choose  Enter your selection: [none]
option  Web server for development?
choose  Enter your selection: [puma]
option  Web server for production?
choose  Enter your selection: [puma]
option  Database used in development?
choose  Enter your selection: [sqlite]
option  Template engine?
choose  Enter your selection: [erb]
option  Test framework?
choose  Enter your selection: [rspec]
option  Continuous testing?
choose  Enter your selection: [none]
option  Front-end framework?
choose  Enter your selection: [bootstrap4]
option  Add support for sending email?
choose  Enter your selection: [mandrill]
option  Authentication?
choose  Enter your selection: [devise]
option  Devise modules?
choose  Enter your selection: [confirmable]
option  OmniAuth provider?
choose  Enter your selection: []
option  Authorization?
choose  Enter your selection: [pundit]
option  Use a form builder gem?
choose  Enter your selection: []
option  Add pages?
choose  Enter your selection: [about+users]
option  Set a locale?
choose  Enter your selection: [none]
option  Install page-view analytics?
choose  Enter your selection: [ga]
option  Add a deployment mechanism?
choose  Enter your selection: [heroku]
option  Set a robots.txt file to ban spiders?
choose  Enter your selection: []
option  Create a GitHub repository? (y/n)
choose  Enter your selection: [true]
option  Add gem and file for environment variables?
choose  Enter your selection: [foreman]
option  Improve error reporting with 'better_errors' during development?
choose  Enter your selection: [true]
option  Use 'pry' as console replacement during development and test?
choose  Enter your selection: []
option  Use or create a project-specific rvm gemset?
choose  Enter your selection: []
@tomelam
Copy link
Author

tomelam commented Dec 31, 2016

The "Updating origin Permission denied (publickey)" problem was solved by fixing my SSH key for GitHub. (I don't know how or when that got broken. I thought it was working.) I checked on GitHub and found my Rails app finally got pushed. Rails apps I previously created with Rails Composer initialized empty repositories on GitHub somehow. (I don't know how if the SSH key was broken.)

The Gemfile-parsing error is still there.

@tomelam
Copy link
Author

tomelam commented Jan 1, 2017

Apparently the problem (Gemfile parsing) does not exist for the combination of ruby-2.3.0 and rails-4.2.6.

@tomelam tomelam closed this as completed Jan 1, 2017
@pconrad
Copy link

pconrad commented Jan 4, 2017

I'm still having this problem with the combination of ruby-2.3.3 and rails 5.0.1. I'll try ruby-2.3.0 and rails-4.2.6. and see if I can reproduce the "absence" of the error in that case.

@tomelam
Copy link
Author

tomelam commented Jan 5, 2017

@pconrad I'll be watching your progress because it seems that when I use ruby-2.3.0 and rails-4.2.6 and choose the "confirmable" option for Devise I run into a problem with the "confirm!" method, which has been deprecated.

@DanielKehoe
Copy link
Member

@tomelam Thanks for bringing this to my attention. Rails 5.0.1 broke Rails Composer. Made a small change to the regex that cleans up comments in the Gemfile and it is now fixed with RailsApps/rails_apps_composer@1e247ce.

@tomelam
Copy link
Author

tomelam commented Jan 8, 2017

@DanielKehoe Thanks for your monumental, faithful work on the example apps, books, and tutorials.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants