jackchammons
jackchammons

Reputation: 63

Ruby on Rails Rakefile error

When I push my ruby on rails app to heroku all the images don't load.

I have attempted to precompile all assets but I get this error:

jack:my_first_ruby_app Jack$ bundle exec rake assets:precompile
rake aborted!
/Users/Jack/Sites/my_first_ruby_app/Rakefile:1: unknown regexp option - b
/Users/Jack/Sites/my_first_ruby_app/Rakefile:1: syntax error, unexpected tIDENTIFIER,     expecting keyword_do or '{' or '('
/Users/Jack/.rvm/gems/ruby-2.0.0-p195@global/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `load'
/Users/Jack/.rvm/gems/ruby-2.0.0-p195@global/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `load_rakefile'
/Users/Jack/.rvm/gems/ruby-2.0.0-p195@global/gems/rake-10.0.4/lib/rake/application.rb:589:in `raw_load_rakefile'
/Users/Jack/.rvm/gems/ruby-2.0.0-p195@global/gems/rake-10.0.4/lib/rake/application.rb:89:in `block in load_rakefile'
/Users/Jack/.rvm/gems/ruby-2.0.0-p195@global/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/Users/Jack/.rvm/gems/ruby-2.0.0-p195@global/gems/rake-10.0.4/lib/rake/application.rb:88:in `load_rakefile'
/Users/Jack/.rvm/gems/ruby-2.0.0-p195@global/gems/rake-10.0.4/lib/rake/application.rb:72:in `block in run'
/Users/Jack/.rvm/gems/ruby-2.0.0-p195@global/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/Users/Jack/.rvm/gems/ruby-2.0.0-p195@global/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'
/Users/Jack/.rvm/gems/ruby-2.0.0-p195/bin/ruby_noexec_wrapper:14:in `eval'
/Users/Jack/.rvm/gems/ruby-2.0.0-p195/bin/ruby_noexec_wrapper:14:in `<main>'

Contents of Rakefile:

/usr/bin/env rake
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.

require File.expand_path('../config/application', __FILE__)

MyFirstRubyApp::Application.load_tasks

Version of Ruby 2.0.0p195

Upvotes: 1

Views: 336

Answers (1)

Rajarshi Das
Rajarshi Das

Reputation: 12320

Please Edit your Rakefile

and commented the line 1

like this

#!/usr/bin/env rake

Upvotes: 6

Related Questions