• 有人翻译吗?

  • #12 楼 @Mandy 发一份给我吧。

  • 电子版有中文的吗?

  • 社区是用得这个吗?

  • #9 楼 @leeboqiang

    哦。我以为 4 已经正是版了啊,看到 社区的管理员说他用 2 +4 了。还以为已经正是版了。

  • #5 楼 @saiga

    我用 3.0.12 的新建立了一个项目(按那个http://guides.ruby-china.org/getting_started.html 来做的)

    ~/Ruby-project$ gem install bundle
    Fetching: bundle-0.0.1.gem (100%)
    Successfully installed bundle-0.0.1
    Installing ri documentation for bundle-0.0.1
    Done installing documentation for bundle (0 sec).
    1 gem installed
    ~/Ruby-project$ rails new blog
          create  
          create  README.rdoc
          create  Rakefile
          create  config.ru
          create  .gitignore
          create  Gemfile
          create  app
          create  app/assets/images/rails.png
          create  app/assets/javascripts/application.js
          create  app/assets/stylesheets/application.css
          create  app/controllers/application_controller.rb
          create  app/helpers/application_helper.rb
          create  app/views/layouts/application.html.erb
          create  app/mailers/.gitkeep
          create  app/models/.gitkeep
          create  config
          create  config/routes.rb
          create  config/application.rb
          create  config/environment.rb
          create  config/environments
          create  config/environments/development.rb
          create  config/environments/production.rb
          create  config/environments/test.rb
          create  config/initializers
          create  config/initializers/backtrace_silencers.rb
          create  config/initializers/inflections.rb
          create  config/initializers/mime_types.rb
          create  config/initializers/secret_token.rb
          create  config/initializers/session_store.rb
          create  config/initializers/wrap_parameters.rb
          create  config/locales
          create  config/locales/en.yml
          create  config/boot.rb
          create  config/database.yml
          create  db
          create  db/seeds.rb
          create  doc
          create  doc/README_FOR_APP
          create  lib
          create  lib/tasks
          create  lib/tasks/.gitkeep
          create  lib/assets
          create  lib/assets/.gitkeep
          create  log
          create  log/.gitkeep
          create  public
          create  public/404.html
          create  public/422.html
          create  public/500.html
          create  public/favicon.ico
          create  public/index.html
          create  public/robots.txt
          create  script
          create  script/rails
          create  test/fixtures
          create  test/fixtures/.gitkeep
          create  test/functional
          create  test/functional/.gitkeep
          create  test/integration
          create  test/integration/.gitkeep
          create  test/unit
          create  test/unit/.gitkeep
          create  test/performance/browsing_test.rb
          create  test/test_helper.rb
          create  tmp/cache
          create  tmp/cache/assets
          create  vendor/assets/javascripts
          create  vendor/assets/javascripts/.gitkeep
          create  vendor/assets/stylesheets
          create  vendor/assets/stylesheets/.gitkeep
          create  vendor/plugins
          create  vendor/plugins/.gitkeep
             run  bundle install
    Fetching gem metadata from https://rubygems.org/...........
    Fetching gem metadata from https://rubygems.org/..
    Resolving dependencies...
    Using rake (10.0.3) 
    Using i18n (0.6.1) 
    Using multi_json (1.6.1) 
    Using activesupport (3.2.12) 
    Using builder (3.0.4) 
    Using activemodel (3.2.12) 
    Using erubis (2.7.0) 
    Using journey (1.0.4) 
    Using rack (1.4.5) 
    Using rack-cache (1.2) 
    Using rack-test (0.6.2) 
    Using hike (1.2.1) 
    Using tilt (1.3.3) 
    Using sprockets (2.2.2) 
    Using actionpack (3.2.12) 
    Using mime-types (1.21) 
    Using polyglot (0.3.3) 
    Using treetop (1.4.12) 
    Using mail (2.4.4) 
    Using actionmailer (3.2.12) 
    Using arel (3.0.2) 
    Using tzinfo (0.3.35) 
    Using activerecord (3.2.12) 
    Using activeresource (3.2.12) 
    Using bundler (1.3.0.pre.8) 
    Installing coffee-script-source (1.4.0) 
    Installing execjs (1.4.0) 
    Installing coffee-script (2.2.0) 
    Using rack-ssl (1.3.3) 
    Using json (1.7.7) 
    Installing rdoc (3.12.2) 
    Using thor (0.17.0) 
    Using railties (3.2.12) 
    Installing coffee-rails (3.2.2) 
    Installing jquery-rails (2.2.1) 
    Using rails (3.2.12) 
    Installing sass (3.2.6) 
    Installing sass-rails (3.2.6) 
    Installing sqlite3 (1.3.7) 
    Installing uglifier (1.3.0) 
    Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
    Post-install message from rdoc:
    Depending on your version of ruby, you may need to install ruby rdoc/ri data:
    
    <= 1.8.6 : unsupported
     = 1.8.7 : gem install rdoc-data; rdoc-data --install
     = 1.9.1 : gem install rdoc-data; rdoc-data --install
    >= 1.9.2 : nothing to do! Yay!
    ~/Ruby-project$ 
    
    

    在运行 run bundle install的过程中,我开了另外一个终端。
    执行了 sed -i -e 's/ftp\.ruby-lang\.org\/pub\/ruby/ruby\.taobao\.org\/mirrors\/ruby/g' ~/.rvm/config/db

    那现在

    $cd blog/
    rails s #这一步瞎报错,百度了半天, 然后安装下面的这写包
    gem install execjs
    gem install ref libv8 therubyracer
    sudo apt-get install nodejs
    $ rails s
    => Booting WEBrick
    => Rails 3.2.12 application starting in development on http://0.0.0.0:3000
    => Call with -d to detach
    => Ctrl-C to shutdown server
    [2013-02-25 21:49:15] INFO  WEBrick 1.3.1
    [2013-02-25 21:49:15] INFO  ruby 2.0.0 (2013-02-24) [x86_64-linux]
    [2013-02-25 21:49:15] INFO  WEBrick::HTTPServer#start: pid=22522 port=3000
    
    
    Started GET "/assets/rails.png" for 127.0.0.1 at 2013-02-25 21:49:46 +0800
    Connecting to database specified by database.yml
    Served asset /rails.png - 200 OK (88ms)
    
    
    Started GET "/rails/info/properties" for 127.0.0.1 at 2013-02-25 21:50:03 +0800
    Processing by Rails::InfoController#properties as */*
      Rendered inline template (3.9ms)
    Completed 200 OK in 70ms (Views: 68.8ms | ActiveRecord: 0.0ms)
    
    

    终于启动了, @saiga 多谢你啊,没有你的指点,我启动不了。

  • 我也是新手,刚刚也装了 ubuntu 系统来学习 rails

  • #5 楼 @saiga

    升级一下 rvm,rubygems现在是 2.0 了
    
    自己的升级过程:
    1. rvm get stable
    2. rvm install ruby-2.0.0-p0
    3. rvm use ruby-2.0.0-p0 --default
    4. gem install rails
    5. cd project & bundle install
    

    多谢你的指点啊。但是 我这样子操作之后 Rails 还是 3.2.12 没有升级到 4 啊“

    $ ruby -v
    ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-linux]
    $ rails -v
    Rails 3.2.12
    $ gem -v
    2.0.0.rc.2
    
    
  • #23 楼 @bydmm 你的 rails 升级成功了吗?

    我的 ruby 升级成功了,但是 rails 不知道如何升级。

    http://ruby-china.org/topics/8909

  • #14 楼 @huacnlee

    升级过程,能写个教程吗?

    多谢了。
    http://ruby-china.org/topics/8909

  • #1 楼 @Teddy 是用的 ubuntu 12.04.2

    gnome shell里要勾选一个 as login的选项的

    请问这个是在那里尼?

  • 初学 Rails,寻找师傅一枚 at 2013年02月25日

    #4 楼 @itsvoid 强大