请教!关于ruby on rails的问题

张庆龙_ 发布于 2013/08/06 08:47
阅读 1K+
收藏 0

我在下载好国外的一个开源项目的源码,安装了ror,但是执行启动服务器命令(sudo rails s)却出现了

u@ubuntu :~/eol$ sudo rails server
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
/var/lib/gems/1.9.1/gems/rails-2.3.8/lib/rails_generator/generators/applications/app/app_generator.rb:7: Use RbConfig instead of obsolete and deprecated Config.
      exists
      exists  app/controllers
      exists  app/helpers
      exists  app/models
      exists  app/views/layouts
      exists  config/environments
      exists  config/initializers
      exists  config/locales
      exists  db
      exists  doc
      exists  lib
      exists  lib/tasks
      exists  log
      exists  public/images
      exists  public/javascripts
      exists  public/stylesheets
      exists  script/performance
      exists  test/fixtures
      exists  test/functional
      exists  test/integration
      exists  test/performance
      exists  test/unit
      exists  vendor
      exists  vendor/plugins
      exists  tmp/sessions
      exists  tmp/sockets
      exists  tmp/cache
      exists  tmp/pids
   identical  Rakefile
   identical  README
   identical  app/controllers/application_controller.rb
   identical  app/helpers/application_helper.rb
   identical  config/database.yml
   identical  config/routes.rb
   identical  config/locales/en.yml
   identical  db/seeds.rb
   identical  config/initializers/backtrace_silencers.rb
   identical  config/initializers/inflections.rb
   identical  config/initializers/mime_types.rb
   identical  config/initializers/new_rails_defaults.rb
怎么解决!

加载中
0
Lucixfer
Lucixfer
ruby 1.9 use String#encoding ,or U can use ruby 1.87 to run your application.
0
张庆龙_

No,this project requires 1.9.1 or higher. and When I use a normal user account to run "rails server" to start server. it tells me the info below:

++ No config for environments/development_eol_org found, skipping.
++ No config for environment_eol_org found, skipping.
++ No config for environments/local found, skipping.
Exiting
/home/u/.rvm/gems/ruby-1.9.3-p392@upgrade/gems/railties-3.2.13/lib/rails/application/configuration.rb:115:in `read': No such file or directory - /home/u/eol/config/database.yml (Errno::ENOENT)
        from /home/u/.rvm/gems/ruby-1.9.3-p392@upgrade/gems/railties-3.2.13/lib/rails/application/configuration.rb:115:in `database_configuration'
        from /home/u/.rvm/gems/ruby-1.9.3-p392@upgrade/gems/activerecord-3.2.13/lib/active_record/railtie.rb:78:in `block (2 levels) in <class:Railtie>'
        from /home/u/.rvm/gems/ruby-1.9.3-p392@upgrade/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
        from /home/u/.rvm/gems/ruby-1.9.3-p392@upgrade/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
        from /home/u/.rvm/gems/ruby-1.9.3-p392@upgrade/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:26:in `block in on_load'
        from /home/u/.rvm/gems/ruby-1.9.3-p392@upgrade/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:25:in `each'
        from /home/u/.rvm/gems/ruby-1.9.3-p392@upgrade/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:25:in `on_load'
        from /home/u/.rvm/gems/ruby-1.9.3-p392@upgrade/gems/activerecord-3.2.13/lib/active_record/railtie.rb:74:in `block in <class:Railtie>'
        from /home/u/.rvm/gems/ruby-1.9.3-p392@upgrade/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `instance_exec'
        from /home/u/.rvm/gems/ruby-1.9.3-p392@upgrade/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `run'
        from /home/u/.rvm/gems/ruby-1.9.3-p392@upgrade/gems/railties-3.2.13/lib/rails/initializable.rb:55:in `block in run_initializers'
        from /home/u/.rvm/gems/ruby-1.9.3-p392@upgrade/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `each'
        from /home/u/.rvm/gems/ruby-1.9.3-p392@upgrade/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `run_initializers'
        from /home/u/.rvm/gems/ruby-1.9.3-p392@upgrade/gems/railties-3.2.13/lib/rails/application.rb:136:in `initialize!'
        from /home/u/.rvm/gems/ruby-1.9.3-p392@upgrade/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
        from /home/u/eol/config/environment.rb:23:in `<top (required)>'
        from /home/u/.rvm/gems/ruby-1.9.3-p392@upgrade/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
        from /home/u/.rvm/gems/ruby-1.9.3-p392@upgrade/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
        from /home/u/.rvm/gems/ruby-1.9.3-p392@upgrade/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
        from /home/u/.rvm/gems/ruby-1.9.3-p392@upgrade/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
        from /home/u/eol/config.ru:3:in `block in <main>'
        from /home/u/.rvm/gems/ruby-1.9.3-p392@upgrade/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
        from /home/u/.rvm/gems/ruby-1.9.3-p392@upgrade/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
        from /home/u/eol/config.ru:in `new'
        from /home/u/eol/config.ru:in `<main>'
        from /home/u/.rvm/gems/ruby-1.9.3-p392@upgrade/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
        from /home/u/.rvm/gems/ruby-1.9.3-p392@upgrade/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
        from /home/u/.rvm/gems/ruby-1.9.3-p392@upgrade/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
        from /home/u/.rvm/gems/ruby-1.9.3-p392@upgrade/gems/railties-3.2.13/lib/rails/commands/server.rb:46:in `app'
        from /home/u/.rvm/gems/ruby-1.9.3-p392@upgrade/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
        from /home/u/.rvm/gems/ruby-1.9.3-p392@upgrade/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
        from /home/u/.rvm/gems/ruby-1.9.3-p392@upgrade/gems/railties-3.2.13/lib/rails/commands/server.rb:70:in `start'
        from /home/u/.rvm/gems/ruby-1.9.3-p392@upgrade/gems/railties-3.2.13/lib/rails/commands.rb:55:in `block in <top (required)>'
        from /home/u/.rvm/gems/ruby-1.9.3-p392@upgrade/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
        from /home/u/.rvm/gems/ruby-1.9.3-p392@upgrade/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
        from script/rails:6:in `require'
        from script/rails:6:in `<main>'

how should I solve the problem!Thks a lot!    

    

返回顶部
顶部