I'm trying to just get the "hello world" application running on my hosting service (Dreamhost) using rvm . I use rvm to use Ruby 1.9.2 and Rails 3.1
I understand that there are better hosting environments and better ways to do this, but so far I have been thinking that I will try to fight and try to do this job.
I have a cgi script work which shows that rvm is working fine: http://rails.hortitude.com/foo.cgi
#!/usr/bin/env /home/hortitude/.rvm/bin/ruby-1.9.2-p290 puts "Content-Type: text/html" puts puts "<html>" puts "<body>" puts "<h1>Hello Ruby!</h1>" puts "<p>shebang: #!/usr/bin/env /home/hortitude/.rvm/bin/ruby-1.9.2-p290</p>" puts "<p>RUBY_VERSION: " + RUBY_VERSION + "</p>" puts "<p>RUBY_PLATFORM: " + RUBY_PLATFORM + "</p>" puts "<p> RUBY_RELEASE_DATE: " + RUBY_RELEASE_DATE + "</p>" puts "</body>" puts "</html>" puts "</html>"
However, my dispatch.fcgi script always gives me an error (found in error logs)
Premature end of header script: dispatch.fcgi
Here is my dispatch.fcgi script:
#!/usr/bin/env /home/hortitude/.rvm/bin/ruby-1.9.2-p290 ENV['GEM_HOME'] ||= '/home/hortitude/.rvm/gems/ruby-1.9.2-p290' require 'rubygems' require 'fcgi' ENV['RAILS_ENV'] ||= 'production'
source share