Ruby on Rails new installation on Ubuntu , problem getting a new app to work (TypeError) ! -
just installed ror on ubuntu 10.10 , created new app, welcome page, when create simple index page typeerror. here have done:
following instructions available @ https://help.ubuntu.com/community/rubyonrails
eveything looks fine no error during installation. opted out built in web server keep things simple.
i created new app using:
/var/www/$ rails new mynewapp
and started webserver in terminal:
/var/www/mynewapp/script$ rails server => booting webrick => rails 3.0.3 application starting in development on http://0.0.0.0:3000 => call -d detach => ctrl-c shutdown server [2011-02-22 17:14:09] info webrick 1.3.1 [2011-02-22 17:14:09] info ruby 1.8.7 (2010-06-23) [i686-linux] [2011-02-22 17:14:24] info webrick::httpserver#start: pid=10120 port=3000
i welcome page right. followed tutorial @ (http://guides.rubyonrails.org/getting_started.html) , created index page:
/var/www/mynewapp$ rails generate controller home index
then edited newlly created mynewapp/views/home/index.html.erb add bit of html. edited mynewapp/config/routes.rb :
blog::application.routes.draw #... # can have root of site routed "root" # remember delete public/index.html. root :to => "home#index"
now when browse localhost:3000 instead of welcome screen following error on browser:
typeerror
can't convert fixnum string
rails.root: /var/www/mynewapp
and appears in terminal:
started "/" 127.0.0.1 @ wed feb 23 12:23:17 -0500 2011 typeerror (can't convert fixnum string): rendered /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.1ms) rendered /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (2.1ms) rendered /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (6.5ms)
do know doing wrong? thx
seems there triubles database. can run "rake db:migrate --trace" , post result, if still have such problem?
Comments
Post a Comment