Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/66.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 如何在Windows上设置rails和mysql_Ruby On Rails_Ruby - Fatal编程技术网

Ruby on rails 如何在Windows上设置rails和mysql

Ruby on rails 如何在Windows上设置rails和mysql,ruby-on-rails,ruby,Ruby On Rails,Ruby,我已经在windows上安装了ruby on rails和mysql C:\Sites>rails-v 轨道3.2.12 C:\Sites>rails新简单的\u cms-d mysql 创造 创建README.rdoc 创建耙子 创建config.ru create.gitignore 创建Gemfile 创建应用程序 创建app/assets/images/rails.png 创建app/assets/javascripts/application.js 创建app/assets/styl

我已经在windows上安装了ruby on rails和mysql

C:\Sites>rails-v
轨道3.2.12
C:\Sites>rails新简单的\u cms-d mysql
创造
创建README.rdoc
创建耙子
创建config.ru
create.gitignore
创建Gemfile
创建应用程序
创建app/assets/images/rails.png
创建app/assets/javascripts/application.js
创建app/assets/stylesheets/application.css
创建app/controllers/application_controller.rb
创建app/helpers/application_helper.rb
创建app/views/layouts/application.html.erb
创建app/mailers/.gitkeep
创建app/models/.gitkeep
创建配置
创建config/routes.rb
创建config/application.rb
创建config/environment.rb
创建配置/环境
创建config/environments/development.rb
创建config/environments/production.rb
创建config/environments/test.rb
创建配置/初始值设定项
创建config/initializers/backtrace_消音器.rb
创建config/initializers/indlections.rb
创建config/initializers/mime_types.rb
创建config/initializers/secret_token.rb
创建config/initializers/session_store.rb
创建config/initializers/wrap_parameters.rb
创建配置/区域设置
创建config/locales/en.yml
创建config/boot.rb
创建config/database.yml
创建数据库
创建db/seeds.rb
创建文档
为应用程序创建文档/自述文件
创建库
创建库/任务
创建lib/tasks/.gitkeep
创建库/资产
创建lib/assets/.gitkeep
创建日志
创建log/.gitkeep
公开
创建public/404.html
创建public/422.html
创建public/500.html
创建public/favicon.ico
创建public/index.html
创建public/robots.txt
创建脚本
创建脚本/rails
创建测试/固定装置
创建test/fixtures/.gitkeep
创建测试/功能
创建test/functional/.gitkeep
创建测试/集成
创建test/integration/.gitkeep
创建测试/单元
创建test/unit/.gitkeep
创建测试/性能/浏览\u test.rb
创建test/test_helper.rb
创建tmp/cache
创建tmp/cache/assets
创建供应商/资产/Java脚本
创建vendor/assets/javascripts/.gitceep
创建供应商/资产/样式表
创建供应商/资产/样式表/.gitkeep
创建供应商/插件
创建供应商/插件/.gitkeep
运行包安装
从中获取gem元数据https://rubygems.org/...........
从中获取gem元数据https://rubygems.org/..
正在解析依赖项。。。
使用耙(10.0.3)
使用i18n(0.6.4)
安装multi_json(1.7.0)
使用activesupport(3.2.12)
使用生成器(3.0.4)
使用activemodel(3.2.12)
使用erubis(2.7.0)
使用旅程(1.0.4)
使用机架(1.4.5)
使用机架缓存(1.2)
使用机架测试(0.6.2)
使用远足(1.2.1)
使用倾斜(1.3.5)
使用链轮(2.2.2)
使用actionpack(3.2.12)
使用mime类型(1.21)
使用polyglot(0.3.3)
使用树梢(1.4.12)
使用邮件(2.4.4)
使用actionmailer(3.2.12)
使用arel(3.0.2)
使用tzinfo(0.3.37)
使用activerecord(3.2.12)
使用activeresource(3.2.12)
使用打捆机(1.3.3)
使用coffee脚本源代码(1.6.1)
使用execjs(1.4.0)
使用coffee脚本(2.2.0)
使用机架ssl(1.3.3)
安装json(1.7.7)
安装rdoc(3.12.2)
使用thor(0.17.0)
使用栏杆(3.2.12)
使用咖啡导轨(3.2.2)
使用jquery rails(2.2.1)
安装mysql2(0.3.11)
使用轨道(3.2.12)
使用sass(3.2.7)
使用sass轨道(3.2.6)
安装uglifier(1.3.0)
您的包已完成!
使用“bundle show[gemname]”查看捆绑gem的安装位置。
来自rdoc的安装后消息:
根据您的ruby版本,您可能需要安装ruby rdoc/ri数据:
=1.9.2:无事可做!耶!
来自mysql2的安装后消息:
================================================================================
======================
您已经安装了mysql2的二进制版本。
它是使用MySQL Connector/C版本6.0.2构建的。
建议使用完全相同的版本以避免潜在问题。
在构建此gem时,必要的DLL文件(如果可用)
在以下下载中:
http://dev.mysql.com/get/Downloads/Connector-C/mysql-connector-c-noinstall-6.0
.2-win32.zip/from/pick
并将lib\libmysql.dll文件放在Ruby bin目录中,例如C:\Ruby\
箱子
================================================================================
======================
C:\Sites>rails服务器
用法:
rails新应用程序路径[选项]
选项:
-r、 [--ruby=PATH]#您选择的ruby二进制文件的路径
#默认值:C:/RailsInstaller/Ruby1.9.3/bin/ruby
.exe
-b、 [--builder=builder]#应用程序生成器的路径(可以是文件
系统路径或URL)
-m、 [--template=template]#应用程序模板的路径(可以是fil
(系统路径或URL)
[--跳过gemfile]#不要创建gemfile
[--skip bundle]#不运行bundle安装
-G、 [--skip git]#skip git忽略并保留
-O、 [--跳过活动记录]#跳过活动记录文件
-S、 [--跳过链轮]#跳过链轮文件
-d、 [--database=database]#为所选数据库预配置(选项:
mysql/oracle/postgresql/sqlite3/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3
/jdbcpostgresql/jdbc)
#默认值:sqlite3
-j、 [--javascript=javascript]#为所选javascript库预配置
#默认值:jquery
-J、 [--跳过javascript]#跳过javascript文件
[--dev]#使用GEMT文件设置应用程序
o您的Rails结帐
[--边缘]
C:\Sites>rails -v
Rails 3.2.12

C:\Sites>rails new simple_cms  -d mysql
      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.4)
Installing multi_json (1.7.0)
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.5)
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.37)
Using activerecord (3.2.12)
Using activeresource (3.2.12)
Using bundler (1.3.3)
Using coffee-script-source (1.6.1)
Using execjs (1.4.0)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.3)
Installing json (1.7.7)
Installing rdoc (3.12.2)
Using thor (0.17.0)
Using railties (3.2.12)
Using coffee-rails (3.2.2)
Using jquery-rails (2.2.1)
Installing mysql2 (0.3.11)
Using rails (3.2.12)
Using sass (3.2.7)
Using sass-rails (3.2.6)
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!
Post-install message from mysql2:

================================================================================
======================

  You've installed the binary version of mysql2.
  It was built using MySQL Connector/C version 6.0.2.
  It's recommended to use the exact same version to avoid potential issues.

  At the time of building this gem, the necessary DLL files where available
  in the following download:

  http://dev.mysql.com/get/Downloads/Connector-C/mysql-connector-c-noinstall-6.0
.2-win32.zip/from/pick

  And put lib\libmysql.dll file in your Ruby bin directory, for example C:\Ruby\
bin

================================================================================
======================


C:\Sites>rails server
Usage:
  rails new APP_PATH [options]

Options:
  -r, [--ruby=PATH]              # Path to the Ruby binary of your choice
                                 # Default: C:/RailsInstaller/Ruby1.9.3/bin/ruby
.exe
  -b, [--builder=BUILDER]        # Path to a application builder (can be a files
ystem path or URL)
  -m, [--template=TEMPLATE]      # Path to an application template (can be a fil
esystem path or URL)
      [--skip-gemfile]           # Don't create a Gemfile
      [--skip-bundle]            # Don't run bundle install
  -G, [--skip-git]               # Skip Git ignores and keeps
  -O, [--skip-active-record]     # Skip Active Record files
  -S, [--skip-sprockets]         # Skip Sprockets files
  -d, [--database=DATABASE]      # Preconfigure for selected database (options:
mysql/oracle/postgresql/sqlite3/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3
/jdbcpostgresql/jdbc)
                                 # Default: sqlite3
  -j, [--javascript=JAVASCRIPT]  # Preconfigure for selected JavaScript library
                                 # Default: jquery
  -J, [--skip-javascript]        # Skip JavaScript files
      [--dev]                    # Setup the application with Gemfile pointing t
o your Rails checkout
      [--edge]                   # Setup the application with Gemfile pointing t
o Rails repository
  -T, [--skip-test-unit]         # Skip Test::Unit files
      [--old-style-hash]         # Force using old style hash (:foo => 'bar') on
 Ruby >= 1.9

Runtime options:
  -f, [--force]    # Overwrite files that already exist
  -p, [--pretend]  # Run but do not make any changes
  -q, [--quiet]    # Suppress status output
  -s, [--skip]     # Skip files that already exist

Rails options:
  -h, [--help]     # Show this help message and quit
  -v, [--version]  # Show Rails version number and quit

Description:
    The 'rails new' command creates a new Rails application with a default
    directory structure and configuration at the path you specify.

    You can specify extra command-line arguments to be used every time
    'rails new' runs in the .railsrc configuration file in your home directory.

    Note that the arguments specified in the .railsrc file don't affect the
    defaults values shown above in this help message.

Example:
    rails new ~/Code/Ruby/weblog

    This generates a skeletal Rails installation in ~/Code/Ruby/weblog.
    See the README in the newly created application to get going.

C:\Sites>cmd.exe
Microsoft Windows [Version 6.2.9200]
(c) 2012 Microsoft Corporation. All rights reserved.