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

rails 4 beta support #59

Closed
wants to merge 2 commits into from
Closed

rails 4 beta support #59

wants to merge 2 commits into from

Conversation

slbug
Copy link
Contributor

@slbug slbug commented Aug 7, 2012

I think it's time to do it :)

@jeshuaborges
Copy link

👍

@nevir
Copy link

nevir commented Sep 21, 2012

No issues with this branch so far for me :)

@scottdavis
Copy link
Member

I hope to get this merged soon been super busy latley

On Fri, Sep 21, 2012 at 12:36 PM, Ian MacLeod notifications@git.luolix.topwrote:

No issues with this branch so far for me :)


Reply to this email directly or view it on GitHubhttps://github.com//pull/59#issuecomment-8772234.

@ekampp
Copy link

ekampp commented Oct 6, 2012

👍

@olivierlacan
Copy link
Contributor

What's missing for getting merged in?

@scottdavis
Copy link
Member

My free time =(

Sent from my iPhone

On Oct 13, 2012, at 12:46 AM, Olivier Lacan notifications@github.com wrote:

What's missing for getting merged in?


Reply to this email directly or view it on GitHub.

@wuputah
Copy link

wuputah commented Oct 31, 2012

@slbug Any chance of an update? Seems sprockets/rails/static_compiler is no more.

@slbug
Copy link
Contributor Author

slbug commented Nov 8, 2012

Will try soon. Need to dig into sprockets integration

@elfassy
Copy link

elfassy commented Nov 26, 2012

+1

1 similar comment
@neersighted
Copy link

👍

@ghempton
Copy link

👍

@balexand
Copy link

+1

@ai
Copy link
Contributor

ai commented Dec 18, 2012

I need this fix too.

@ai
Copy link
Contributor

ai commented Dec 18, 2012

@slbug when I use your fork on edge Rails, and sprockets-rails 2.0.0.rc1, I get cannot load such file -- sprockets/rails/static_compiler (LoadError)

@ai
Copy link
Contributor

ai commented Dec 18, 2012

@slbug problem is that you fork stable branch, not master, where there isn’t static compiler patch.

@slbug
Copy link
Contributor Author

slbug commented Dec 18, 2012

@ai, i've used master branch, but static compiler was removed after i created this pull request. And atm i don't have time to update it.

@ai
Copy link
Contributor

ai commented Dec 18, 2012

@slbug after I fix static compiler issue I have abother problem: File to import not found or unreadable: compass/css3. compass-rails copy compass options to Sass options, but, as I understand, Sass importer doesn’t use this Sass options to load Compass files :(.

@ai
Copy link
Contributor

ai commented Dec 18, 2012

The second problem in Rails 4 and Compass is that Sass template compiler is now directly in the sprockets gem, not in sass-rails. So new Sass compelier doesn’t know anything about Rails, and it just take load_paths only from Assets Pipeline, not from Rails.application.config.sass.load_paths.

I create really quick hack to enable Compass in Rails 4.

@machty
Copy link

machty commented Dec 30, 2012

Quick, potentially obselete comment: whatever the solution with integration Rails 4 is, Compass ought to provide a generalized interface for files generated in the compilation process, and not just particularly for sprite images. I had enough of a wretched time mimicking the Rails 3 + compass-rails hack to get something similar to auto-sprite-generation working, so whatever the Rails 4 integration, I'd just make sure Compass plugins have some api for registering their mid-compile generated assets.

@scottdavis
Copy link
Member

Just want to keep everyone in the loop this is on my list of things to get done. We are trying to set up a hack weekend to get the next version of compass out the door. Once that has happened i will get rails 4 support released

@mrleeio
Copy link

mrleeio commented Jan 9, 2013

Awesome, I'm having no luck with the hack posted by ai.

@take
Copy link

take commented Jan 10, 2013

omg when will this be merged :D

@milgner
Copy link

milgner commented Jan 14, 2013

Great work, looking forward to official Rails 4 support! For the time being, I merged together the changes by @slbug and @ai. You can find the branch at milgner/compass-rails@1749c06f15dc4b058427e7969810457213647fb8

As far as I can see after a short testdrive, everything works fine.

@rubiii
Copy link

rubiii commented Jan 22, 2013

@milgner tried your branch and it works for me. thanks!

def write_manifest_with_sprites(manifest)
write_manifest_without_sprites(manifest.merge(self.class.generated_sprites))
if CompassRails.rails4?
require 'sprockets/rails/static_compiler'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this no longer exists in sprockets-rails.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any suggestions what to do about this? It's causing errors for me.

@woto
Copy link

woto commented Jan 25, 2013

👍 where is rails4 support? :(

@ghost
Copy link

ghost commented Feb 4, 2013

@milgner, or others:

Any instructions for how to get this working with Rails 4? I've tried to integrate the various branches here without success (I blame myself).

One of the first issues I'm seeing is a warning when starting the Rails server: 'Unsupported rails environment for compass' (Compass is a dependency of the Foundation framework, which I'm attempting to use with Rails 4).

@chrisnicola
Copy link

@jduarte
Copy link

jduarte commented Jul 1, 2013

Have you tried remove it from the assets group? I'm not 100% sure if it
were removed from Rails 4 but in the RC's:

Now, according to the (still in progress) upgrade
documentationhttp://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#upgrading-from-rails-3-2-to-rails-4-0
:

Rails 4.0 removed the assets group from Gemfile. You'd need to remove that
line from your Gemfile when upgrading.

On Mon, Jul 1, 2013 at 11:53 PM, Alexandre Gaudencio <
notifications@github.com> wrote:

Hi guys.

This solution doesn't seem to be working to me :(

Here's my gem file :

source 'https://rubygems.org'

Bundle edge Rails instead: gem 'rails', github: 'rails/rails'gem 'rails', '4.0.0'

Use sqlite3 as the database for Active Recordgem 'sqlite3'

group :assets do
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
gem "compass-rails", github: "milgner/compass-rails", ref: "1749c06f15dc4b058427e7969810457213647fb8"end

Use Uglifier as compressor for JavaScript assetsgem 'uglifier', '>= 1.3.0'

See https://github.com/sstephenson/execjs#readme for more supported runtimes# gem 'therubyracer', platforms: :ruby

Use jquery as the JavaScript librarygem 'jquery-rails'

group :development, :test do
gem 'better_errors'
gem 'binding_of_caller'
gem 'pry'end

Use ActiveModel has_secure_password# gem 'bcrypt-ruby', '~> 3.0.0'

Use unicorn as the app server# gem 'unicorn'

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

Use debugger# gem 'debugger', group: [:development, :test]

And I just keep on getting

File to import not found or unreadable: compass/css3.

I've read this whole topic but the given solution (the hacked branch from
@milgner https://github.com/milgner ) doesn't work for me for some
reason (that I can't find)


Reply to this email directly or view it on GitHubhttps://github.com//pull/59#issuecomment-20316303
.

José Duarte

@Shahor
Copy link

Shahor commented Jul 2, 2013

@jduarte Excellent, thanks for the suggestion 👍
It works like a charm now.

@scottdavis
Copy link
Member

For those of you who have this working I have 2 questions.

  1. Do sprites work corretly
  2. Does the precompile for production work correctly

@rdj
Copy link

rdj commented Jul 3, 2013

Those are the two things I was having problems with. Specifically, one sprite worked ok, but subsequent sprites didn't work. And then the production compile didn't seem like it was going to "just work". So I rolled back to Rails 3.2 for now.

@scottdavis
Copy link
Member

Ihave spent about 2 hours now digging into this. I got everything working but sprites and precompile. since the new precompile method uses a rake task i have no way at getting at the manifest instance to append the compiled sprites other then this hack:

manifest = nil
ObjectSpace.each_object(::Sprockets::Manifest) { |o| manifest ||= o}
manifest.assets[logical_path.to_s] = asset.digest_path

Im not ok with shipping this with compass rails since well its gross and could have unexpected results if things were running threads so... unless someone knows how to get a handle to the current objects in a rake task or sprockets exposes an interface for adding objects to the manifest on the fly I'm not sure i can get this working properly

@scottdavis
Copy link
Member

@frgooall
Copy link

frgooall commented Jul 3, 2013

Also reporting that

gem 'compass-rails', github: 'milgner/compass-rails', ref: '1749c06f15dc4b058427e7969810457213647fb8'

Work for me as well!

@scottdavis
Copy link
Member

@frgooall I can guarantee these 2 things are not working #59 (comment). you are going to have a bad time when you try and deploy

@frgooall
Copy link

frgooall commented Jul 3, 2013

Okay, thanks for the heads up! does the Rails4 branch work?

@nogenhat
Copy link

nogenhat commented Jul 3, 2013

@scottdavis still, have a problem with your branch:
different prefix: "" and "APP_PATH/app/assets/fonts"

@scottdavis
Copy link
Member

@reizenikker can you be more descriptive

@nogenhat
Copy link

nogenhat commented Jul 3, 2013

@scottdavis i will try.
rake assets:precompile on development compile normally.
but on production, like RAILS_ENV=production rake assets:precompile
executed with this error

@scottdavis
Copy link
Member

@reizenikker could you set up a small test project that duplicates this error?

@nogenhat
Copy link

nogenhat commented Jul 3, 2013

of course

Ivan Nastyukhin

On Thursday, July 4, 2013 at 12:03 AM, Scott Davis wrote:

@reizenikker (https://github.com/reizenikker) could you set up a small test project that duplicates this error?


Reply to this email directly or view it on GitHub (#59 (comment)).

@nogenhat
Copy link

nogenhat commented Jul 4, 2013

@stereoscott
Copy link

@scottdavis I'd be happy to try and pick up where you left off on this rails4-hack branch if you want to point me in the right direction...

@scottdavis
Copy link
Member

Just needs test cases added and the rails4 branch merged in

Sent from my iPhone

On Jul 12, 2013, at 11:22 AM, Scott M notifications@github.com wrote:

@scottdavis I'd be happy to try and pick up where you left off on this rails4-hack branch if you want to point me in the right direction...


Reply to this email directly or view it on GitHub.

@aledalgrande
Copy link

This worked for me as well:

gem 'compass-rails', github: 'milgner/compass-rails', branch: 'rails4'

@pccjamie
Copy link

Thanks for your work on this Scott. Rails dev student. Looking forward to when I know enough to be able to contribute to projects like this.

kenips referenced this pull request in tsechingho/chosen-rails Jul 22, 2013
@scottdavis
Copy link
Member

cc0df72

Please file any bugs under a new issue

http://rubygems.org/gems/compass-rails/versions/2.0.alpha.0

@scottdavis scottdavis closed this Jul 25, 2013
@ghost
Copy link

ghost commented Jul 27, 2013

Thanks @scottdavis!

@robrobbins
Copy link

+1

@Shahor
Copy link

Shahor commented Jul 29, 2013

Thanks 👍

@burisu
Copy link

burisu commented Aug 6, 2013

Thanks for your work.

@kirs
Copy link

kirs commented Sep 25, 2013

Thanks!

@pSenthil202
Copy link

Thanks +1

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

Successfully merging this pull request may close these issues.

None yet