emcee icon indicating copy to clipboard operation
emcee copied to clipboard

Emcee Railtie cant Modify frozen Array

Open lomefin opened this issue 9 years ago • 7 comments

I'm installing a Rails project from scratch using Bower+Emcee, following this tutorial: http://stackoverflow.com/questions/26884022/google-polymer-with-rails-4

When I get to step 3 or 4

 rails g bower_rails:initialize
 rails g emcee:install

I get this error

/home/lluarteg/.rvm/gems/ruby-2.2.2@project2/bundler/gems/emcee-a47ed9852328/lib/emcee/railtie.rb:12:in `unshift': can't modify frozen Array (RuntimeError)
from /home/lluarteg/.rvm/gems/ruby-2.2.2@project2/bundler/gems/emcee-  a47ed9852328/lib/emcee/railtie.rb:12:in `block in <class:Railtie>'
from /home/lluarteg/.rvm/gems/ruby-2.2.2@project2/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `instance_exec'
...

I'm using Rails 4.2.1 and Ruby 2.2.2

This is how my Gemfile looks

source 'https://rubygems.org'
ruby "2.2.2"

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.1'
# Use postgresql as the database for Active Record
gem 'pg'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

gem 'rails_12factor', group: :production
# Use Puma as the app server
gem 'puma'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

gem 'bower-rails'
gem 'emcee', github: 'ahuth/emcee'



group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug'

  # Access an IRB console on exception pages or by using <%= console %> in views
  gem 'web-console', '~> 2.0'

  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
  gem 'spring'
end

lomefin avatar May 09 '15 00:05 lomefin

@lomefin try add to your gem file gem "sprockets", "< 3.0.0"

brovikov avatar May 09 '15 18:05 brovikov

Thank you @lomefin for the report, and thanks @brovikov for a potential work-around. This project is no longer under development, so hopefully the work-around works for you, or hopefully you can find something else that suites your needs.

ahuth avatar May 11 '15 00:05 ahuth

The suggested fix-around worked. But, it took sprockets from v3.1.0 down to 2.12.3. I question whether that is the best, long-term fix for this issue.

dsaronin avatar May 12 '15 21:05 dsaronin

That's definitely not a good long-term fix for the issue. Unfortunately, this project is no longer under development. Sorry!

ahuth avatar May 13 '15 02:05 ahuth

@brovikov it worked. thx.

@ahuth any chance we can find someone to maintain it? I myself can not do because I'm working with iOS and Rails APIs more than with Rails front end. But I certainly would be happy to use emcee from time to time for my front end projects.

alexvbush avatar Sep 29 '15 17:09 alexvbush

@ahuth maybe we can reach out to webcomponents and polymer communities?

alexvbush avatar Sep 29 '15 17:09 alexvbush

Hey, @alexvbush. Somebody can certainly fork the repo. I don't want to put in the time to find someone to maintain it, though. Sorry!

ahuth avatar Oct 02 '15 21:10 ahuth