在终端创建Rails项目和用RubyMine创建

1.用终端密令创建Rails项目

 在终端输入:

rails new Test    //Test 为你的项目名称.

 将会出现以下显示:

create  
      create  README.rdoc
      create  Rakefile
      create  config.ru
      create  .gitignore
      create  Gemfile
      create  app
      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/assets/images/.keep
      create  app/mailers/.keep
      create  app/models/.keep
      create  app/controllers/concerns/.keep
      create  app/models/concerns/.keep
      create  bin
      create  bin/bundle
      create  bin/rails
      create  bin/rake
      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/filter_parameter_logging.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  lib
      create  lib/tasks
      create  lib/tasks/.keep
      create  lib/assets
      create  lib/assets/.keep
      create  log
      create  log/.keep
      create  public
      create  public/404.html
      create  public/422.html
      create  public/500.html
      create  public/favicon.ico
      create  public/robots.txt
      create  test/fixtures
      create  test/fixtures/.keep
      create  test/controllers
      create  test/controllers/.keep
      create  test/mailers
      create  test/mailers/.keep
      create  test/models
      create  test/models/.keep
      create  test/helpers
      create  test/helpers/.keep
      create  test/integration
      create  test/integration/.keep
      create  test/test_helper.rb
      create  tmp/cache
      create  tmp/cache/assets
      create  vendor/assets/javascripts
      create  vendor/assets/javascripts/.keep
      create  vendor/assets/stylesheets
      create  vendor/assets/stylesheets/.keep
         run  bundle install

这时候会停在 bundle install ,在这需要等一会。当出现:

 

 

Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.

 表示已经完成。如果停在run bundle install 太久你可以按下:

 

 

control c //同时按下这两个键

 来终止。然后输入:

cd Test

 进入到你创建的项目文件夹下面。再接着输入:

 

 

bundle install

 当终端显示:

Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Using rake (10.1.0) 
Installing i18n (0.6.9) 
Using minitest (4.7.5) 
Using multi_json (1.8.2) 
Using atomic (1.1.14) 
Using thread_safe (0.1.3) 
Using tzinfo (0.3.38) 
Using activesupport (4.0.1) 
Using builder (3.1.4) 
Using erubis (2.7.0) 
Using rack (1.5.2) 
Using rack-test (0.6.2) 
Using actionpack (4.0.1) 
Using mime-types (1.25.1) 
Using polyglot (0.3.3) 
Using treetop (1.4.15) 
Using mail (2.5.4) 
Using actionmailer (4.0.1) 
Using activemodel (4.0.1) 
Using activerecord-deprecated_finders (1.0.3) 
Using arel (4.0.1) 
Using activerecord (4.0.1) 
Using bundler (1.3.5) 
Using coffee-script-source (1.6.3) 
Using execjs (2.0.2) 
Using coffee-script (2.2.0) 
Using thor (0.18.1) 
Using railties (4.0.1) 
Using coffee-rails (4.0.1) 
Using hike (1.2.3) 
Installing jbuilder (1.5.3) 
Using jquery-rails (3.0.4) 
Using json (1.8.1) 
Using tilt (1.4.1) 
Using sprockets (2.10.1) 
Using sprockets-rails (2.0.1) 
Using rails (4.0.1) 
Using rdoc (3.12.2) 
Using sass (3.2.12) 
Using sass-rails (4.0.1) 
Using sdoc (0.3.20) 
Using sqlite3 (1.3.8) 
Installing turbolinks (2.0.0) 
Installing uglifier (2.3.3) 
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.

 表示已经完成。

 

2.用RubyMine创建Rails项目(本人用的RubyMine版本是5.4)

打开RubyMine:

在终端创建Rails项目和用RubyMine创建_第1张图片
 

然后选择:Create New Project ,将会弹出:

在终端创建Rails项目和用RubyMine创建_第2张图片
 

在这里,注意要选择: Project type 的选项  为 Rails application 。然后点击 ok,弹出以下界面:

在终端创建Rails项目和用RubyMine创建_第3张图片
 

这里要注意 Ruby SDK ,和 Rails Version 的选项,这两个的版本号,是自己电脑上安装的。 还有 Preconfigure for selected database:选项,你可以选择你自己习惯用的数据库。

点击ok后。 将进入:
在终端创建Rails项目和用RubyMine创建_第4张图片
 

注意最低下的窗口, 在执行 run bundle install ,这时需要等待。还在终端时一样。等到bundle install 执行完成后就可以啦。

 

你可能感兴趣的:(on,Ruby,Rails,rubymine)