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

  • SEARCH
  • Home
  • 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 1002391
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:49:33+00:00 2026-05-16T07:49:33+00:00

This works just fine in my dev environment (I am rewriting a css file):

  • 0

This works just fine in my dev environment (I am rewriting a css file):

File.open(RAILS_ROOT + '\public\stylesheets\colors.css', 'w') do |w|  
    w.puts 'some_text'
end

But when I run it in my prod environment (on Dreamhost) nothing happens – the file is not modified – nothing.

What I need to be able to do is to overwrite an existing file, which I can’t seem to figure out in production. I even set the chmod to 777 and that didn’t change anything, it also doesn’t appear that anything is showing up in the logs?

I am a noob in RoR, I appreciate the help.

  • 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-05-16T07:49:34+00:00Added an answer on May 16, 2026 at 7:49 am

    You are writing to a file called \public\stylesheets\colors.css when you would really like to write to a file called colors.css in /public/stylesheets/

    Backslash, \, is a valid filename character in POSIX filesystems, but is the directory separator in NTFS. Change your backslashes to forward slashes.

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

Sidebar

Related Questions

OK, i have this page on my DEV server and it works just fine...
This is a problem where firefox works just fine, while chrome has the problem.
This aspect of my login system works just fine if I have the return
I have a Firefox 3.6.2 problem (3.5.x works just fine). This is the code:
I want to port this SQL query, which works just fine on SQL Server,
I've got a problem with this embed in Safari. It works just fine on
I'm using this function: preg_match_all('/((\d{9})\.html)/s', $content, $results); It works fine but i just want
This code works on one of my dev boxes (using JQ v1.3.2.) I just
I´m currently developing a web site using Symfony2. On 'dev' environment everything works just
This is a simple click function. Although it works just fine when using a

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.