RailsApps / rails-composer

Rails Composer. The Rails generator on steroids for starter apps.
http://www.railscomposer.com/
3.38k stars 486 forks source link

Error: cannot load such file -- html2haml #101

Closed rikai closed 11 years ago

rikai commented 11 years ago

Running into some issues with getting everything working correctly.

When i try using rails-composer, it fails with: The template [https://raw.github.com/RailsApps/rails-composer/master/composer.rb] could not be loaded. Error: cannot load such file -- html2haml

Full log:

[rikai@rotor GroupLife]$ rails new . -m https://raw.github.com/RailsApps/rails-composer/master/composer.rb
       exist  
      create  README.rdoc
      create  Rakefile
      create  config.ru
    conflict  .gitignore
Overwrite /mnt/git/GroupLife/.gitignore? (enter "h" for help) [Ynaqdh] y
       force  .gitignore
      create  Gemfile
      create  app
      create  app/assets/images/rails.png
      create  app/assets/javascripts/application.js
      create  app/assets/stylesheets/application.css
      create  app/controllers/application_controller.rb
      create  app/helpers/application_helper.rb
      create  app/views/layouts/application.html.erb
      create  app/mailers/.gitkeep
      create  app/models/.gitkeep
      create  config
      create  config/routes.rb
      create  config/application.rb
      create  config/environment.rb
      create  config/environments
      create  config/environments/development.rb
      create  config/environments/production.rb
      create  config/environments/test.rb
      create  config/initializers
      create  config/initializers/backtrace_silencers.rb
      create  config/initializers/inflections.rb
      create  config/initializers/mime_types.rb
      create  config/initializers/secret_token.rb
      create  config/initializers/session_store.rb
      create  config/initializers/wrap_parameters.rb
      create  config/locales
      create  config/locales/en.yml
      create  config/boot.rb
      create  config/database.yml
      create  db
      create  db/seeds.rb
      create  doc
      create  doc/README_FOR_APP
      create  lib
      create  lib/tasks
      create  lib/tasks/.gitkeep
      create  lib/assets
      create  lib/assets/.gitkeep
      create  log
      create  log/.gitkeep
      create  public
      create  public/404.html
      create  public/422.html
      create  public/500.html
      create  public/favicon.ico
      create  public/index.html
      create  public/robots.txt
      create  script
      create  script/rails
      create  test/fixtures
      create  test/fixtures/.gitkeep
      create  test/functional
      create  test/functional/.gitkeep
      create  test/integration
      create  test/integration/.gitkeep
      create  test/unit
      create  test/unit/.gitkeep
      create  test/performance/browsing_test.rb
      create  test/test_helper.rb
      create  tmp/cache
      create  tmp/cache/assets
      create  vendor/assets/javascripts
      create  vendor/assets/javascripts/.gitkeep
      create  vendor/assets/stylesheets
      create  vendor/assets/stylesheets/.gitkeep
      create  vendor/plugins
      create  vendor/plugins/.gitkeep
       apply  https://raw.github.com/RailsApps/rails-composer/master/composer.rb
 initializer    generators.rb
    composer  WOOT! The recipes you've selected are known to work together.
    composer  Using rails_apps_composer recipes to generate an application.
      insert    config/application.rb
      recipe  Running core recipe...
        core  selected all core recipes
      recipe  Running git recipe...
         git  initialize git
      remove    .gitignore
      create    .gitignore
         run    git init from "."
Reinitialized existing Git repository in /mnt/git/GroupLife/.git/
         run    git add -A from "."
         run    git commit -qm "rails_apps_composer: initial commit" from "."
      recipe  Running railsapps recipe...
    question  Install an example application?
          1)  I want to build my own application
          2)  membership/subscription/saas
          3)  rails-prelaunch-signup
          4)  rails3-bootstrap-devise-cancan
          5)  rails3-devise-rspec-cucumber
          6)  rails3-mongoid-devise
          7)  rails3-mongoid-omniauth
          8)  rails3-subdomains
   railsapps  Enter your selection: 1
      recipe  Running setup recipe...
       setup  Your operating system is linux-gnu.
       setup  You are using Ruby version 2.0.0.
       setup  You are using Rails version 3.2.13.
    question  Web server for development?
          1)  WEBrick (default)
          2)  Thin
          3)  Unicorn
          4)  Puma
       setup  Enter your selection: 1
    question  Web server for production?
          1)  Same as development
          2)  Thin
          3)  Unicorn
          4)  Puma
       setup  Enter your selection: 3
    question  Database used in development?
          1)  SQLite
          2)  PostgreSQL
          3)  MySQL
          4)  MongoDB
       setup  Enter your selection: 1
    question  Template engine?
          1)  ERB
          2)  Haml
          3)  Slim (experimental)
       setup  Enter your selection: 2
    question  Unit testing?
          1)  Test::Unit
          2)  RSpec
          3)  MiniTest
       setup  Enter your selection: 1
    question  Integration testing?
          1)  None
          2)  RSpec with Capybara
          3)  Cucumber with Capybara
          4)  Turnip with Capybara
          5)  MiniTest with Capybara
       setup  Enter your selection: 1
    question  Continuous testing?
          1)  None
          2)  Guard
       setup  Enter your selection: 1
    question  Fixture replacement?
          1)  None
          2)  Factory Girl
          3)  Machinist
          4)  Fabrication
       setup  Enter your selection: 1
    question  Front-end framework?
          1)  None
          2)  Twitter Bootstrap
          3)  Zurb Foundation
          4)  Skeleton
          5)  Just normalize CSS for consistent styling
       setup  Enter your selection: 3
    question  Add support for sending email?
          1)  None
          2)  Gmail
          3)  SMTP
          4)  SendGrid
          5)  Mandrill
       setup  Enter your selection: 5
    question  Authentication?
          1)  None
          2)  Devise
          3)  OmniAuth
       setup  Enter your selection: 2
    question  Devise modules?
          1)  Devise with default modules
          2)  Devise with Confirmable module
          3)  Devise with Confirmable and Invitable modules
       setup  Enter your selection: 3
    question  Authorization?
          1)  None
          2)  CanCan with Rolify
       setup  Enter your selection: 2
    question  Use a form builder gem?
          1)  None
          2)  SimpleForm
       setup  Enter your selection: 2
    question  Install a starter app?
          1)  None
          2)  Home Page
          3)  Home Page, User Accounts
          4)  Home Page, User Accounts, Admin Dashboard
       setup  Enter your selection: 2
      create    README
      append    README
      recipe  Running readme recipe...
      recipe  Running gems recipe...
     gemfile    unicorn (>= 4.3.1)
        gsub    Gemfile
        gsub    Gemfile
     gemfile    haml-rails (>= 0.4)
     gemfile    html2haml (>= 1.0.1)
     gemfile    compass-rails (>= 1.0.3)
     gemfile    zurb-foundation (>= 4.0.9)
     gemfile    devise (>= 2.2.3)
     gemfile    devise_invitable (>= 1.1.5)
     gemfile    cancan (>= 1.6.9)
     gemfile    rolify (>= 3.2.0)
     gemfile    simple_form (>= 2.1.0)
         run    git add -A from "."
         run    git commit -qm "rails_apps_composer: Gemfile" from "."
      recipe  Running testing recipe...
      recipe  Running email recipe...
      recipe  Running models recipe...
      recipe  Running controllers recipe...
      recipe  Running views recipe...
      recipe  Running routes recipe...
      recipe  Running frontend recipe...
      recipe  Running init recipe...
      recipe  Running prelaunch recipe...
      recipe  Running prelaunch recipe...
      recipe  Running extras recipe...
      extras  Set a robots.txt file to ban spiders? (y/n) y
      extras  Create a GitHub repository? (y/n) n
      extras  Use application.yml file for environment variables? (y/n) y
      extras  Reduce assets logger noise during development? (y/n) y
      extras  Improve error reporting with 'better_errors' during development? (y/n) y
      extras  recipe setting quiet_assets for reduced asset pipeline logging
     gemfile    quiet_assets (>= 1.0.2)
      extras  recipe creating application.yml file for environment variables
     gemfile    figaro (>= 0.6.3)
      extras  recipe adding better_errors gem
     gemfile    better_errors (>= 0.7.2)
     gemfile    binding_of_caller (>= 0.7.1)
      extras  recipe banning spiders by modifying 'public/robots.txt'
      extras  Add 'therubyracer' JavaScript runtime (for Linux users without node.js)? (y/n) y
      extras  recipe adding 'therubyracer' JavaScript runtime gem
     gemfile    libv8 (>= 3.11.8)
     gemfile    therubyracer (>= 0.11.3)
    composer  Installing gems. This will take a while.
         run    bundle install --without production from "."
Using rake (10.0.4) 
Using i18n (0.6.1) 
Using multi_json (1.7.3) 
Using activesupport (3.2.13) 
Using builder (3.0.4) 
Using activemodel (3.2.13) 
Using erubis (2.7.0) 
Using journey (1.0.4) 
Using rack (1.4.5) 
Using rack-cache (1.2) 
Using rack-test (0.6.2) 
Using hike (1.2.2) 
Using tilt (1.4.1) 
Using sprockets (2.2.2) 
Using actionpack (3.2.13) 
Using mime-types (1.23) 
Using polyglot (0.3.3) 
Using treetop (1.4.12) 
Using mail (2.5.4) 
Using actionmailer (3.2.13) 
Using arel (3.0.2) 
Using tzinfo (0.3.37) 
Using activerecord (3.2.13) 
Using activeresource (3.2.13) 
Using coffee-script-source (1.6.2) 
Using execjs (1.4.0) 
Using coffee-script (2.2.0) 
Using rack-ssl (1.3.3) 
Using json (1.8.0) 
Using rdoc (3.12.2) 
Using thor (0.18.1) 
Using railties (3.2.13) 
Using coffee-rails (3.2.2) 
Using haml (4.0.2) 
Using haml-rails (0.4) 
Using jquery-rails (2.2.1) 
Using libv8 (3.11.8.17) 
Using bundler (1.3.5) 
Using rails (3.2.13) 
Using ref (1.0.4) 
Using sass (3.2.9) 
Using sass-rails (3.2.6) 
Using sqlite3 (1.3.7) 
Using therubyracer (0.11.4) 
Using uglifier (2.1.1) 
Your bundle is complete!
Gems in the group production were not installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
    composer  Running 'after bundler' callbacks.
    composer  importing html2haml conversion tool
The template [https://raw.github.com/RailsApps/rails-composer/master/composer.rb] could not be loaded. Error: cannot load such file -- html2haml
DanielKehoe commented 11 years ago

I was unable to duplicate the issue using the same parameters (on Mac OS X not Linux, though).

This looks odd:

run    git init from "."
Reinitialized existing Git repository in /mnt/git/GroupLife/.git/

Also I have this and you don't:

run    bundle install --without production from "."
Fetching source index from https://rubygems.org/
Resolving dependencies.......................................
Using rake (10.0.4)
rikai commented 11 years ago

Reinitialized existing Git repository in /mnt/git/GroupLife/.git/ is because i'm running the script in a folder which is already part of a git repo. The folder is empty though, so it's just a blank repository. Well, other than the .git folder and the .gitignore file, anyway. Is this a problem?

I have no idea why there is no source index, though. Maybe thats what is causing the issue?

Additional info that may be useful:

rvm 1.20.9 (stable)
ruby 2.0.0p195

Things i did before running the command:

rvm use ruby-2.0.0-p195@GroupLife --ruby-version --create
DanielKehoe commented 11 years ago

My ~/.gemrc file looks like this:

---
:backtrace: false
:benchmark: false
:bulk_threshold: 1000
:sources:
- https://rubygems.org
:update_sources: true
:verbose: true
install: --no-rdoc --no-ri
update: --no-rdoc --no-ri
rikai commented 11 years ago

From poking around a bit, if all your gems are available locally, bundler doesn't try to update the sources. So i believe the reason i don't have that line is because bundler had already installed all the gems on my previous attempt. I tried this process several times before reporting it.

Looking over the list of installed gems, i did notice... conspicuously missing is the html2haml gem. This is the very gem that's causing the error... Shouldn't html2haml be showing up in the list of gems from bundle install?

DanielKehoe commented 11 years ago

The html2haml should be added when you select Haml as an option. Not sure why not in your case.

rikai commented 11 years ago

Well, from my limited understanding, that's my best guess as to the cause of the problem. I just now tried to create something in a completely fresh directory. Ran into the exact same issue. I'll happily provide any information needed if i can. :)

Other information that may be of use is that i'm trying this on Arch Linux. There are also several other bugs that had the same error, though i think perhaps for different reasons. #77 and #66...

Edit: Annnd it seems i've just solved this by taking a cue from here and actually doing a rvm gemset empty GroupLife which seemed to resolve that error for seemingly no real reason?

After that, i manually reinstalled rails and reran rails-composer. That gave me the error The template [https://raw.github.com/RailsApps/rails-composer/master/composer.rb] could not be loaded. Error: You have already activated rake 0.9.6, but your Gemfile requires rake 10.0.4. Using bundle exec may solve this.. Looking here i tried gem uninstall rake -v 0.9.6 which returned gem "rake" cannot be uninstalled because it is a default gem.

So i decided to try a gem install rake anyway. Got Successfully installed rake-10.0.4. Since that seemed to work, i emptied the folder of everything but the .git and .gitignore again and reran rails new . -m https://raw.github.com/RailsApps/rails-composer/master/composer.rb.

Everything seems to have worked this time, i only see a few out of place things.

A rake related warning:

WARN: Unresolved specs during Gem::Specification.reset:
      rake (>= 0.8.7)
      json (~> 1.4)

And some deprecation warnings with html2haml which will probably have to be taken care of before they have their next release:

      remove    app/views/layouts/application.html.haml
/home/rikai/.rvm/gems/ruby-2.0.0-p195@GroupLife/gems/html2haml-1.0.1/lib/html2haml/html.rb:346: warning: wrong element type nil at 0 (expected array)
/home/rikai/.rvm/gems/ruby-2.0.0-p195@GroupLife/gems/html2haml-1.0.1/lib/html2haml/html.rb:346: warning: ignoring wrong elements is deprecated, remove them explicitly
/home/rikai/.rvm/gems/ruby-2.0.0-p195@GroupLife/gems/html2haml-1.0.1/lib/html2haml/html.rb:346: warning: this causes ArgumentError in the next release
/home/rikai/.rvm/gems/ruby-2.0.0-p195@GroupLife/gems/html2haml-1.0.1/lib/html2haml/html.rb:346: warning: wrong element type nil at 1 (expected array)
/home/rikai/.rvm/gems/ruby-2.0.0-p195@GroupLife/gems/html2haml-1.0.1/lib/html2haml/html.rb:346: warning: ignoring wrong elements is deprecated, remove them explicitly
/home/rikai/.rvm/gems/ruby-2.0.0-p195@GroupLife/gems/html2haml-1.0.1/lib/html2haml/html.rb:346: warning: this causes ArgumentError in the next release
/home/rikai/.rvm/gems/ruby-2.0.0-p195@GroupLife/gems/html2haml-1.0.1/lib/html2haml/html.rb:346: warning: wrong element type nil at 0 (expected array)
/home/rikai/.rvm/gems/ruby-2.0.0-p195@GroupLife/gems/html2haml-1.0.1/lib/html2haml/html.rb:346: warning: ignoring wrong elements is deprecated, remove them explicitly
/home/rikai/.rvm/gems/ruby-2.0.0-p195@GroupLife/gems/html2haml-1.0.1/lib/html2haml/html.rb:346: warning: this causes ArgumentError in the next release
/home/rikai/.rvm/gems/ruby-2.0.0-p195@GroupLife/gems/html2haml-1.0.1/lib/html2haml/html.rb:346: warning: wrong element type nil at 0 (expected array)
/home/rikai/.rvm/gems/ruby-2.0.0-p195@GroupLife/gems/html2haml-1.0.1/lib/html2haml/html.rb:346: warning: ignoring wrong elements is deprecated, remove them explicitly
/home/rikai/.rvm/gems/ruby-2.0.0-p195@GroupLife/gems/html2haml-1.0.1/lib/html2haml/html.rb:346: warning: this causes ArgumentError in the next release
/home/rikai/.rvm/gems/ruby-2.0.0-p195@GroupLife/gems/html2haml-1.0.1/lib/html2haml/html.rb:346: warning: wrong element type nil at 1 (expected array)
/home/rikai/.rvm/gems/ruby-2.0.0-p195@GroupLife/gems/html2haml-1.0.1/lib/html2haml/html.rb:346: warning: ignoring wrong elements is deprecated, remove them explicitly
/home/rikai/.rvm/gems/ruby-2.0.0-p195@GroupLife/gems/html2haml-1.0.1/lib/html2haml/html.rb:346: warning: this causes ArgumentError in the next release
/home/rikai/.rvm/gems/ruby-2.0.0-p195@GroupLife/gems/html2haml-1.0.1/lib/html2haml/html.rb:346: warning: wrong element type nil at 0 (expected array)
/home/rikai/.rvm/gems/ruby-2.0.0-p195@GroupLife/gems/html2haml-1.0.1/lib/html2haml/html.rb:346: warning: ignoring wrong elements is deprecated, remove them explicitly
/home/rikai/.rvm/gems/ruby-2.0.0-p195@GroupLife/gems/html2haml-1.0.1/lib/html2haml/html.rb:346: warning: this causes ArgumentError in the next release
/home/rikai/.rvm/gems/ruby-2.0.0-p195@GroupLife/gems/html2haml-1.0.1/lib/html2haml/html.rb:346: warning: wrong element type nil at 1 (expected array)
/home/rikai/.rvm/gems/ruby-2.0.0-p195@GroupLife/gems/html2haml-1.0.1/lib/html2haml/html.rb:346: warning: ignoring wrong elements is deprecated, remove them explicitly
/home/rikai/.rvm/gems/ruby-2.0.0-p195@GroupLife/gems/html2haml-1.0.1/lib/html2haml/html.rb:346: warning: this causes ArgumentError in the next release
      create    app/views/layouts/application.html.haml

Just figured i'd document what fixed it for me in case it helps you figure out what was going on or if someone else runs into the same problem. :)

DanielKehoe commented 11 years ago

Thanks for pointing out the deprecation warnings.

Glad you resolved your issue. Starting from a clean install is good advice for anyone who encounters this issue.

rikai commented 11 years ago

I did notice that after i've done all this, unicorn doesn't seem to have gotten installed for use with production despite having chosen it in the setup process. Attempting to run it gave bash: unicorn: command not found.

Installing it manually with gem install unicorn installs unicorn, kgio and raindrops and running it works as expected, but it's odd that it wasn't installed already...

Also, it is in the Gemfile as gem "unicorn", ">= 4.3.1", :group => :production so i'm unsure why it wouldn't have been installed.

Edit: Even more oddly, despite the fact that it is in the Gemfile, bundle install does not list it as getting installed when run. Am i missing something obvious here?

mikeabiezzi commented 10 years ago

I'm also getting the error. I'm running Mavericks and rbenv, and I rails new'd to a non-existent directory, so it's all a fresh slate.

➜  Projects  rails new bccrn -T -m https://raw.github.com/RailsApps/rails-composer/master/composer.rb
      create
      create  README.rdoc
      create  Rakefile
      create  config.ru
      create  .gitignore
      create  Gemfile
      create  app
      create  app/assets/javascripts/application.js
      create  app/assets/stylesheets/application.css
      create  app/controllers/application_controller.rb
      create  app/helpers/application_helper.rb
      create  app/views/layouts/application.html.erb
      create  app/assets/images/.keep
      create  app/mailers/.keep
      create  app/models/.keep
      create  app/controllers/concerns/.keep
      create  app/models/concerns/.keep
      create  bin
      create  bin/bundle
      create  bin/rails
      create  bin/rake
      create  config
      create  config/routes.rb
      create  config/application.rb
      create  config/environment.rb
      create  config/secrets.yml
      create  config/environments
      create  config/environments/development.rb
      create  config/environments/production.rb
      create  config/environments/test.rb
      create  config/initializers
      create  config/initializers/assets.rb
      create  config/initializers/backtrace_silencers.rb
      create  config/initializers/cookies_serializer.rb
      create  config/initializers/filter_parameter_logging.rb
      create  config/initializers/inflections.rb
      create  config/initializers/mime_types.rb
      create  config/initializers/session_store.rb
      create  config/initializers/wrap_parameters.rb
      create  config/locales
      create  config/locales/en.yml
      create  config/boot.rb
      create  config/database.yml
      create  db
      create  db/seeds.rb
      create  lib
      create  lib/tasks
      create  lib/tasks/.keep
      create  lib/assets
      create  lib/assets/.keep
      create  log
      create  log/.keep
      create  public
      create  public/404.html
      create  public/422.html
      create  public/500.html
      create  public/favicon.ico
      create  public/robots.txt
      create  tmp/cache
      create  tmp/cache/assets
      create  vendor/assets/javascripts
      create  vendor/assets/javascripts/.keep
      create  vendor/assets/stylesheets
      create  vendor/assets/stylesheets/.keep
       apply  https://raw.github.com/RailsApps/rails-composer/master/composer.rb
    composer
    composer   _____       _ _
    composer  |  __ \     (_) |       /\
    composer  | |__) |__ _ _| |___   /  \   _ __  _ __  ___
    composer  |  _  // _` | | / __| / /\ \ | '_ | '_ \/ __|
    composer  | | \ \ (_| | | \__ \/ ____ \| |_) | |_) \__ \
    composer  |_|  \_\__,_|_|_|___/_/    \_\ .__/| .__/|___/
    composer                               | |   | |
    composer                               | |   | |
    composer
    composer  Rails Composer, open source, supported by subscribers.
    composer  Please join RailsApps to support development of Rails Composer.
    composer  Need help? Ask on Stack Overflow with the tag 'railsapps.'
    composer  Your new application will contain diagnostics in its README file.
      insert    config/application.rb
      recipe  Running core recipe...
        core  selected all core recipes
      recipe  Running git recipe...
         git  initialize git
      remove    .gitignore
      create    .gitignore
         run    git init from "."
Initialized empty Git repository in /Users/mike/Projects/bccrn/.git/
         run    git add -A from "."
         run    git commit -qm "rails_apps_composer: initial commit" from "."
      recipe  Running railsapps recipe...
      option  Build a starter application?
          1)  Build a RailsApps example application
          2)  Contributed applications (none available)
          3)  Custom application (experimental)
      choose  Enter your selection: 3
              Get on the mailing list for Rails Composer news?
      option  Enter your email address:
      recipe  Running learn_rails recipe...
      recipe  Running rails_bootstrap recipe...
      recipe  Running rails_foundation recipe...
      recipe  Running rails_omniauth recipe...
      recipe  Running rails_devise recipe...
      recipe  Running rails_devise_pundit recipe...
      recipe  Running rails_signup_download recipe...
      recipe  Running rails_mailinglist_signup recipe...
      recipe  Running setup recipe...
       setup  Your operating system is darwin13.0.0.
       setup  You are using Ruby version 2.1.0.
       setup  You are using Rails version 4.1.5.
      option  Web server for development?
          1)  WEBrick (default)
          2)  Thin
          3)  Unicorn
          4)  Puma
          5)  Phusion Passenger (Apache/Nginx)
          6)  Phusion Passenger (Standalone)
      choose  Enter your selection: 2
      option  Web server for production?
          1)  Same as development
          2)  Thin
          3)  Unicorn
          4)  Puma
          5)  Phusion Passenger (Apache/Nginx)
          6)  Phusion Passenger (Standalone)
      choose  Enter your selection: 4
      option  Database used in development?
          1)  SQLite
          2)  PostgreSQL
          3)  MySQL
      choose  Enter your selection: 1
      option  Template engine?
          1)  ERB
          2)  Haml
          3)  Slim
      choose  Enter your selection: 2
      option  Test framework?
          1)  None
          2)  RSpec with Capybara
      choose  Enter your selection: 2
       setup  Adding DatabaseCleaner, FactoryGirl, Faker, Launchy, Selenium
      option  Continuous testing?
          1)  None
          2)  Guard
      choose  Enter your selection: 2
      option  Front-end framework?
          1)  None
          2)  Bootstrap 3.0
          3)  Bootstrap 2.3
          4)  Zurb Foundation 5.0
          5)  Zurb Foundation 4.0
          6)  Simple CSS
      choose  Enter your selection: 2
      option  Add support for sending email?
          1)  None
          2)  Gmail
          3)  SMTP
          4)  SendGrid
          5)  Mandrill
      choose  Enter your selection: 1
      option  Authentication?
          1)  None
          2)  Devise
          3)  OmniAuth
      choose  Enter your selection: 2
      option  Devise modules?
          1)  Devise with default modules
          2)  Devise with Confirmable module
          3)  Devise with Confirmable and Invitable modules
      choose  Enter your selection: 1
      option  Authorization?
          1)  None
          2)  Pundit
      choose  Enter your selection: 2
      option  Use a form builder gem?
          1)  None
          2)  SimpleForm
      choose  Enter your selection: 2
      option  Add pages?
          1)  None
          2)  Home
          3)  Home and About
          4)  Home and Users
          5)  Home, About, and Users
      choose  Enter your selection: 2
      create    README
      append    README
      recipe  Running locale recipe...
      option  Set a locale? Enter nothing for English, or es, de, etc:
      recipe  Running readme recipe...
      recipe  Running gems recipe...
      insert    Gemfile
        gsub    Gemfile
        gsub    Gemfile
        gsub    Gemfile
        gsub    Gemfile
         run    git add -A from "."
         run    git commit -qm "rails_apps_composer: Gemfile" from "."
      recipe  Running tests recipe...
      recipe  Running email recipe...
      recipe  Running devise recipe...
      recipe  Running omniauth recipe...
      recipe  Running roles recipe...
      recipe  Running frontend recipe...
      recipe  Running pages recipe...
      recipe  Running init recipe...
      recipe  Running analytics recipe...
      option  Install page-view analytics?
          1)  None
          2)  Google Analytics
          3)  Segment.io
      choose  Enter your selection: 1
      recipe  Running deployment recipe...
      option  Add a deployment mechanism?
          1)  None
          2)  Capistrano3
      choose  Enter your selection: 1
      recipe  Running extras recipe...
      option  Set a robots.txt file to ban spiders? (y/n) y
      option  Create a GitHub repository? (y/n) y
      option  Add gem and file for environment variables?
          1)  None
          2)  Add .env with Foreman
          3)  Add application.yml with Figaro
      choose  Enter your selection: 3
      option  Reduce assets logger noise during development? (y/n) y
      option  Improve error reporting with 'better_errors' during development? (y/n) y
      option  Use 'pry' as console replacement during development and test? (y/n) y
      option  Use or create a project-specific rvm gemset? (y/n) n
      extras  recipe setting quiet_assets for reduced asset pipeline logging
      extras  recipe creating application.yml file for environment variables with figaro
      extras  recipe adding better_errors gem
      extras  recipe adding pry-rails gem
      extras  recipe banning spiders by modifying 'public/robots.txt'
    composer  Installing gems. This will take a while.
         run    bundle install --without production from "."
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
Installing rake (10.3.2)
Installing i18n (0.6.11)
Using json (1.8.1)
Installing minitest (5.4.0)
Installing thread_safe (0.3.4)
Installing tzinfo (1.2.2)
Installing activesupport (4.1.5)
Installing builder (3.2.2)
Installing erubis (2.7.0)
Installing actionview (4.1.5)
Installing rack (1.5.2)
Installing rack-test (0.6.2)
Installing actionpack (4.1.5)
Installing mime-types (1.25.1)
Installing polyglot (0.3.5)
Installing treetop (1.4.15)
Installing mail (2.5.4)
Installing actionmailer (4.1.5)
Installing activemodel (4.1.5)
Installing arel (5.0.1.20140414130214)
Installing activerecord (4.1.5)
Installing addressable (2.3.6)
Installing bcrypt (3.1.7)
Installing coderay (1.1.0)
Installing better_errors (2.0.0)
Installing debug_inspector (0.0.2)
Installing binding_of_caller (0.7.2)
Installing sass (3.2.19)
Installing bootstrap-sass (3.2.0.1)
Using bundler (1.5.3)
Installing mini_portile (0.6.0)
Building nokogiri using packaged libraries.
Building libxml2-2.8.0 for nokogiri with the following patches applied:
    - 0001-Fix-parser-local-buffers-size-problems.patch
    - 0002-Fix-entities-local-buffers-size-problems.patch
    - 0003-Fix-an-error-in-previous-commit.patch
    - 0004-Fix-potential-out-of-bound-access.patch
    - 0005-Detect-excessive-entities-expansion-upon-replacement.patch
    - 0006-Do-not-fetch-external-parsed-entities.patch
    - 0007-Enforce-XML_PARSER_EOF-state-handling-through-the-pa.patch
    - 0008-Improve-handling-of-xmlStopParser.patch
    - 0009-Fix-a-couple-of-return-without-value.patch
    - 0010-Keep-non-significant-blanks-node-in-HTML-parser.patch
    - 0011-Do-not-fetch-external-parameter-entities.patch
************************************************************************
IMPORTANT!  Nokogiri builds and uses a packaged version of libxml2.

If this is a concern for you and you want to use the system library
instead, abort this installation process and reinstall nokogiri as
follows:

    gem install nokogiri -- --use-system-libraries

If you are using Bundler, tell it to use the option:

    bundle config build.nokogiri --use-system-libraries
    bundle install

However, note that nokogiri does not necessarily support all versions
of libxml2.

For example, libxml2-2.9.0 and higher are currently known to be broken
and thus unsupported by nokogiri, due to compatibility problems and
XPath optimization bugs.
************************************************************************
Building libxslt-1.1.28 for nokogiri with the following patches applied:
    - 0001-Adding-doc-update-related-to-1.1.28.patch
    - 0002-Fix-a-couple-of-places-where-f-printf-parameters-wer.patch
    - 0003-Initialize-pseudo-random-number-generator-with-curre.patch
    - 0004-EXSLT-function-str-replace-is-broken-as-is.patch
    - 0006-Fix-str-padding-to-work-with-UTF-8-strings.patch
    - 0007-Separate-function-for-predicate-matching-in-patterns.patch
    - 0008-Fix-direct-pattern-matching.patch
    - 0009-Fix-certain-patterns-with-predicates.patch
    - 0010-Fix-handling-of-UTF-8-strings-in-EXSLT-crypto-module.patch
    - 0013-Memory-leak-in-xsltCompileIdKeyPattern-error-path.patch
    - 0014-Fix-for-bug-436589.patch
    - 0015-Fix-mkdir-for-mingw.patch
************************************************************************
IMPORTANT!  Nokogiri builds and uses a packaged version of libxslt.

If this is a concern for you and you want to use the system library
instead, abort this installation process and reinstall nokogiri as
follows:

    gem install nokogiri -- --use-system-libraries

If you are using Bundler, tell it to use the option:

    bundle config build.nokogiri --use-system-libraries
    bundle install
************************************************************************
Installing nokogiri (1.6.3.1)
Installing xpath (2.0.0)
Installing capybara (2.4.1)
Installing timers (1.1.0)
Installing celluloid (0.15.2)
Installing ffi (1.9.3)
Installing childprocess (0.5.3)
Installing coffee-script-source (1.7.1)
Installing execjs (2.2.1)
Installing coffee-script (2.3.0)
Installing thor (0.19.1)
Installing railties (4.1.5)
Installing coffee-rails (4.0.1)
Installing daemons (1.1.9)
Installing database_cleaner (1.3.0)
Installing orm_adapter (0.5.0)
Installing warden (1.2.3)
Installing devise (3.3.0)
Installing diff-lcs (1.2.5)
Installing eventmachine (1.0.3)
Installing factory_girl (4.4.0)
Installing factory_girl_rails (4.4.1)
Installing faker (1.4.3)
Installing hike (1.2.3)
Installing multi_json (1.10.1)
Installing tilt (1.4.1)
Installing sprockets (2.11.0)
Installing sprockets-rails (2.1.3)
Installing rails (4.1.5)
Installing figaro (1.0.0.rc1)
Installing formatador (0.2.5)
Installing rb-fsevent (0.9.4)
Installing rb-inotify (0.9.5)
Installing listen (2.7.9)
Installing lumberjack (1.0.9)
Installing method_source (0.8.2)
Installing slop (3.6.0)
Installing pry (0.10.1)
Installing guard (2.6.1)
Installing guard-bundler (2.0.0)
Installing guard-rails (0.5.3)
Installing rspec-support (3.0.4)
Installing rspec-core (3.0.4)
Installing rspec-expectations (3.0.4)
Installing rspec-mocks (3.0.4)
Installing rspec (3.0.0)
Installing guard-rspec (4.3.1)
Installing haml (4.1.0.beta.1)
Installing haml-rails (0.5.3)
Installing hpricot (0.8.6)
Installing sexp_processor (4.4.4)
Installing ruby_parser (3.1.3)
Installing html2haml (1.0.1)
Installing hub (1.12.2)
Installing interception (0.5)
Installing jbuilder (2.1.3)
Installing jquery-rails (3.1.1)
Installing launchy (2.4.2)
Installing pry-rails (0.3.2)
Installing pry-rescue (1.4.1)
Installing pundit (0.3.0)
Installing quiet_assets (1.0.3)
Installing rails_apps_pages (0.5.12)
Installing rails_apps_testing (0.3.10)
Installing rails_layout (1.0.21)
Installing rb-fchange (0.0.6)
Installing rdoc (4.1.1)
Installing rspec-rails (3.0.2)
Installing rubyzip (1.1.6)
Installing sass-rails (4.0.3)
Installing sdoc (0.4.1)
Installing websocket (1.0.7)
Installing selenium-webdriver (2.42.0)
Installing simple_form (3.0.2)
Installing spring (1.1.3)
Installing sqlite3 (1.3.9)
Installing thin (1.6.2)
Installing turbolinks (2.3.0)
Installing uglifier (2.5.3)
Your bundle is complete!
Gems in the group production were not installed.
It was installed into ./vendor/bundle
Post-install message from haml:

HEADS UP! Haml 4.0 has many improvements, but also has changes that may break
your application:

* Support for Ruby 1.8.6 dropped
* Support for Rails 2 dropped
* Sass filter now always outputs <style> tags
* Data attributes are now hyphenated, not underscored
* html2haml utility moved to the html2haml gem
* Textile and Maruku filters moved to the haml-contrib gem

For more info see:

http://rubydoc.info/github/haml/haml/file/CHANGELOG.md

Post-install message from hub:

------------------------------------------------------------

                  You there! Wait, I say!
                  =======================

       If you are a heavy user of `git` on the command
       line  you  may  want  to  install `hub` the old
       fashioned way.  Faster  startup  time,  you see.

       Check  out  the  installation  instructions  at
       https://github.com/github/hub#readme  under the
       "Standalone" section.

       Cheers,
       defunkt

------------------------------------------------------------

Post-install message from rdoc:
Depending on your version of ruby, you may need to install ruby rdoc/ri data:

<= 1.8.6 : unsupported
 = 1.8.7 : gem install rdoc-data; rdoc-data --install
 = 1.9.1 : gem install rdoc-data; rdoc-data --install
>= 1.9.2 : nothing to do! Yay!
    composer  Updating gem paths.
WARN: Unresolved specs during Gem::Specification.reset:
      json (>= 1.7.7, ~> 1.7)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
    composer  Stage Two (running recipe 'stage_two' callbacks).
    composer  importing html2haml conversion tool
The template [https://raw.github.com/RailsApps/rails-composer/master/composer.rb] could not be loaded. Error: cannot load such file -- html2haml
DanielKehoe commented 10 years ago

Try building one of the simple RailsApps example applications with the Haml option. See if you can isolate the problem by building one of the simpler apps. I'm able to build the rails-bootstrap app with Haml without any problem.

mrflip commented 9 years ago

For others who may hit this: I got the error

Gem::InstallError: better_errors requires Ruby version >= 2.0.0.
An error occurred while installing better_errors (2.0.0), and Bundler cannot continue.
Make sure that `gem install better_errors -v '2.0.0'` succeeds before bundling.
    composer  Updating gem paths.
    composer  Stage Two (running recipe 'stage_two' callbacks).
    composer  importing html2haml conversion tool
The template [https://raw.github.com/RailsApps/rails-composer/master/composer.rb] could not be loaded. Error: cannot load such file -- html2haml

The problem wasn't with html2haml, it's with the better_errors warning which preceded it.

tripitaka-2 /tmp$ gem install better_errors -v '2.0.0'
ERROR:  Error installing better_errors:
    better_errors requires Ruby version >= 2.0.0.

Moving to ruby >= 2.0.0 did indeed make all the errors go away.

Carpela commented 8 years ago

Same error with Mac OS X Mavericks and ruby 2.1.2 Same thing happens with the rails bootstrap example app