Skip to content

initializer react_rails.setup_vendor fails if gem source files were read-only #175

Closed
@jonswar

Description

@jonswar

These lines in rails/railtie.rb:

    FileUtils.cp(::React::Source.bundled_path_for(filename),
                 tmp_path.join('react.js'))
    FileUtils.cp(::React::Source.bundled_path_for('JSXTransformer.js'),
                 tmp_path.join('JSXTransformer.js'))

will, the first time, create read-only files if the gem sources themselves are read-only (as they are on some deployed systems). On subsequent runs, the copy will fail, causing the initializer to error out. This code should either chmod the files or not copy them if they are already there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions