I want to update my in development Rails app to use the newly released Sass 3.3 RC1. How can I do this if I am using the sass-rails gem?
You merely refer to the master branch of the github repository in this case; Was able to immediately use Sass 3.3 RC! with zero issues within the context of Rails.
Don't forget to upgrade Compass as well the same way:
gem "compass", github: "chriseppstein/compass"
gem "compass-rails", github: "Compass/compass-rails"
Update: merely typing bundle update worked for me on another Rails 4 project to get Sass 3.3.rc1
Related
I updated my Ruby from 1.9 to 2.2 and I found that the Nokogiri gem doesn't support Ruby 2.2 on Windows. Nokogiri was not in my Gemfile, but when I run bundle install it is automatically added. Maybe there are some dependency for it?
This is a very small project and I don't understand its necessity for the project.
Is it possible to use Ruby 2.2 without Nokogiri? Or should I downgrade to 1.9 again?
It looks like Nokogiri is required by rails-dom-testing which is required by Action Pack and Action View in Rails 4.2.3, so it seems difficult to bypass it.
It looks like it is a dependency of some gem, which is included in your Gemfile.
You can search for nokogiri in your Gemfile.lock to find a gem which is requiring it.
See https://github.com/sparklemotion/nokogiri/issues/1256
tl;dr, in your Gemfile:
gem 'nokogiri', '>= 1.6.7.rc3'
for Windows.
I'm wondering if anyone has run into any snags with the haml-rails gem in Rails 4.0. There is a Rails Cast that says there were some problems but there is not much more mention of this. The gem hosted on GitHub also doesn't explicitly mention support for Rails 4.0. So what's the status on this?
I'm using haml-rails (0.4) in a rails 4 project and everything is working
Haml 4.0.4 have release to support rails 4 application. You can use haml-rails. Now, it doesn't have problem. Include gem package in gem file
gem 'haml-rails'
and bundle the project
I would like to use the new SASS 3.2 with rails (3.2).
It seems that sass-rails depends on sass 3.1
How might I go about crafting the Gemfile to use the pre-release
SASS 3.2 gem?
I have tried to fork the sass-rails project and upgrade the sass dependency myself but with no luck and only errors when trying to run bundler..
Any ideas?
You can set the version as a second arg in your Gemfile:
gem 'sass', '3.2.0.alpha.237'
and it will install the version that you have set.
I have a rails app that uses rails gem v3.1.1 and acts-as-taggable-on gem v2.1.1.
Our server build installs the rails v3.1.1 gem before the acts-as-taggable-on v2.1.1 gem.
My problem is that installing the acts-as-taggable-on gem also installs the latest rails (3.2.1) even though I already have rails installed and I end up with 2 versions of rails installed.
Looking at the acts-as-taggable-on gemspec it has rails as a dependency. On install, I would expect acts-as-taggable on to know that the rails gem is installed and not install the latest version.
Can you explain why it installs rails again, and if there is a way to stop it?
Thanks in advance.
Version 2.2.2 of the gem bumps the Rails dependency down to 3.x instead of 3.2. If you're able to upgrade acts-as-taggable-on, switch to v2.2.2 and you should no longer have a dependency clash.
I have a Rails 2.3.5 project that uses the localization features of Rails. I also happen to have Rails 3 beta installed (which depends on the i18n gem). Rails 2.3.5 will happily handle localization on it's own (without i18n installed), however if the i18n gem is available, it makes use of it.
Recently I upgraded my gems and now have version 0.3.7 and 0.4.0 of i18n installed. Rails, of course, wants to load and use the latest version which is causing errors in my project. I tried setting the gem version to 0.3.7 which gets around the errors in the web app. However, we're using resque and resque_mailer to delay the sending of messages. When the worker picks up the mailer job from the queue, it ignores my config.gem requirement in environment.rb and uses version 0.4.0 anyway.
Ideally, I'd like to tell Rails to just not use the i18n gem at all. How do I do that?
Update: As of beta 4, Rails 3 now requires i18n version 0.4.1. I don't see how more people aren't running into this problem as it would seem now if you have both Rails 2 and Rails 3 installed, you're going to run into this.
I followed instructions as defined here:
http://gembundler.com/rails23.html
and it worked.
You could use Bundler or RVM's Gemsets to make the i18n gem unavailable from within your app. Or you could upgrade your Rails app.
Freeze the rails version: rake VERSION=2.3.5 rails:freeze:gems
Fix the version in the file vendor/rails/activesupport/lib/active_support/vendor.rb line 24 to: gem 'i18n', '>= 0.1.3', '< 0.4.0'
Or just edit: /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/vendor.rb
And turn gem 'i18n', '>= 0.1.3'
Into gem 'i18n', '0.1.3'