Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7802735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T01:20:38+00:00 2026-06-02T01:20:38+00:00

I’ve got a strange error in Rails using Sass/Css: 1p*x isn’t a valid CSS

  • 0

I’ve got a strange error in Rails using Sass/Css:

“1p*x isn’t a valid CSS value.”

The application trace says it comes from:

app/assets/stylesheets/shared/form.css.scss:19

But in my file, this line is:

“input{@include all_borders(1px, solid, red);}”

It’s like something is adding a ” * ” between p and x. And, it does the same issue with lot’s of other lines. And… the error just came out, I never had it before, I didn’t change anything in my config files, the only thing I did was to update my gems using bundle update.

[Edit] The Mixin code:

@mixin all_borders($strength: 1px, $type: solid, $color: black){
  border: $strength $type $color;
}

[End Edit]

I also have some “wrong number of arguments (4 for 1)” issues… But again, everything worked fine yesterday… It’s like something is wrong with the precompilation of my scss files… I have the same issue when trying to precompile.

Does anyone have a clue? I don’t know what to do…

If it may help: I’m using Ruby 1.9.3, Rails 3.2.3, sass 3.1.15 and sass-rails 3.2.5, I also post my application.rb & development.rb files:

development.rb
config.cache_classes = false

config.whiny_nils = true

config.consider_all_requests_local       = true
config.action_controller.perform_caching = false

config.action_mailer.raise_delivery_errors = true

config.active_support.deprecation = :log

config.action_dispatch.best_standards_support = :builtin

config.active_record.mass_assignment_sanitizer = :strict

config.active_record.auto_explain_threshold_in_seconds = 0.5

config.assets.compress = false
config.serve_static_assets = false

config.assets.debug = true

application.rb

require File.expand_path('../boot', __FILE__)

require 'rails/all'

if defined?(Bundler)
  Bundler.require(*Rails.groups(:assets => %w(development test)))
end

module MySite
  class Application < Rails::Application
    config.autoload_paths += %W(#{config.root}/lib)

    config.encoding = "utf-8"

    config.assets.enabled = true
    config.assets.initialize_on_precompile = false

    config.assets.version = '1.0'

  end
end

Thanks in advance for taking time to help me. 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T01:20:40+00:00Added an answer on June 2, 2026 at 1:20 am

    Okay I found what the problem was… Pfiew, that was a tough one to find…

    I had to create a whole new project, adding the code of my broken one, file by file and tracking the occurrence of the issue thanks to the Rails server.

    So I discovered that deleting this file:
    /config/initializers/custom_libraries.rb

    Was solving the issue. This file had only one line: require ‘ext/string’

    So the problem had to come from my custom string methods.

    And yes it did. I was adding a “to_a” (to_array) method to the string class because the native Ruby string class doesn’t have this method. The method was:

    def to_a
      return self.chars.to_a
    end
    

    So commenting this method solved my CSS issues. I imagine that the sass-rails gem or CSS related ones is already creating this method and use it for compilation or other CSS stuff and my “to_a” string method surely messed things up. But I’m only guessing…

    Surely the Rails errors weren’t helpful at all to find this out. Does anyone know how I may have found the issue faster? Maybe a specific debug tool to recommend?

    I will learn from this misadventure: never ever create your own method for a specific Ruby class with a name that is too similar with other Ruby class methods.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're building an app, our first using Rails 3, and we're having to build
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I've got a string that has curly quotes in it. I'd like to replace
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
i got an object with contents of html markup in it, for example: string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.