Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is no Ruby script found in input (LoadError)?

Tags:

sass

ruby

rbenv

Ruby is installed by rbenv.

$ ruby -v  
ruby 1.9.3p327 (2012-11-10 revision 37606) [i686-linux]

$ which ruby  
/home/user/.rbenv/shims/ruby

$ which sass  
/home/user/.rbenv/shims/sass

$ gem list
*** LOCAL GEMS ***

bigdecimal (1.1.0) 
bundler (1.2.4)
io-console (0.3)
json (1.5.4)
minitest (2.5.1)
rake (0.9.2.2)
rdoc (3.9.4)
sass (3.2.5)

This is my config.yml:

# Assetic Configuration
assetic:
    // ...

    ruby: /home/user/.rbenv/shims/ruby

    filters:
        cssrewrite: ~
        sass:
            bin: /home/user/.rbenv/shims/sass

        // ...

This is the error I get:

[message] An error occurred while running:
'/home/user/.rbenv/shims/ruby' '/home/user/.rbenv/shims/sass' '--load-path' '/path/to/symfony2/src/My/AnyBundle/Resources/public/css' '--cache-location' '/tmp' '/tmp/assetic_sassYbl6MI'

Error Output:
ruby: no Ruby script found in input (LoadError)

The error in my other setup:

config.yml:

# Assetic Configuration
assetic:
    // ...

    ruby: /home/user/.rbenv/shims/ruby

    filters:
        cssrewrite: ~
        sass: ~

        // ...

This is the error I get:

Error Output:
ruby: No such file or directory -- /usr/bin/sass (LoadError)

Sass does not function. Is it a problem referencing the gem?

like image 472
R.Atim Avatar asked Feb 15 '13 02:02

R.Atim


1 Answers

I've got this error after cloning a rails repo:

$ rails server
c:/RailsInstaller/Ruby1.9.3/bin/ruby.exe: no Ruby script found in input (LoadError)

The problem was in bin/rails and bin/rake. Top line was #!/usr/bin/env, but should have been #!/usr/bin/env ruby.

like image 184
faddison Avatar answered Nov 01 '22 11:11

faddison