Karan Dare
Karan Dare

Reputation: 13

unable to find directory of rails new project

I am new in rails web development. I am using linux mint 14 for rails web development after creating new project now i am unable to locate the project directory and unable to find solution for this problem. I have created new project.

rails new ~/myblog -d mysql

i have also tried this

rails new myblog -d mysql

my current location is /opt/lampp/htdocs

and this is output of console its showing each file successfully created

  create  
  create  app/controllers
  create  app/helpers
  create  app/models
  create  app/views/layouts
  create  config/environments
  create  config/initializers
  create  config/locales
  create  db
  create  doc
  create  lib
  create  lib/tasks
  create  log
  create  public/images
  create  public/javascripts
  create  public/stylesheets
  create  script/performance
  create  test/fixtures
  create  test/functional
  create  test/integration
  create  test/performance
  create  test/unit
  create  vendor
  create  vendor/plugins
  create  tmp/sessions
  create  tmp/sockets
  create  tmp/cache
  create  tmp/pids
  create  Rakefile
  create  README
  create  app/controllers/application_controller.rb
  create  app/helpers/application_helper.rb
  create  config/database.yml
  create  config/routes.rb
  create  config/locales/en.yml
  create  db/seeds.rb
  create  config/initializers/backtrace_silencers.rb
  create  config/initializers/inflections.rb
  create  config/initializers/mime_types.rb
  create  config/initializers/new_rails_defaults.rb
  create  config/initializers/session_store.rb
  create  config/initializers/cookie_verification_secret.rb
  create  config/environment.rb
  create  config/boot.rb
  create  config/environments/production.rb
  create  config/environments/development.rb
  create  config/environments/test.rb
  create  script/about
  create  script/console
  create  script/dbconsole
  create  script/destroy
  create  script/generate
  create  script/runner
  create  script/server
  create  script/plugin
  create  script/performance/benchmarker
  create  script/performance/profiler
  create  test/test_helper.rb
  create  test/performance/browsing_test.rb
  create  public/404.html
  create  public/422.html
  create  public/500.html
  create  public/index.html
  create  public/favicon.ico
  create  public/robots.txt
  create  public/images/rails.png
  create  public/javascripts/prototype.js
  create  public/javascripts/effects.js
  create  public/javascripts/dragdrop.js
  create  public/javascripts/controls.js
  create  public/javascripts/application.js
  create  doc/README_FOR_APP
  create  log/server.log
  create  log/production.log
  create  log/development.log
  create  log/test.log
  create  vendor/rails

but when i enter command for get in directory cd myblog or cd ~/myblog it says no such file directory please anyone can tell me where it is creating projects also when again execute command for create new project with same name it ask me for override files

Upvotes: 1

Views: 424

Answers (3)

user1645055
user1645055

Reputation:

you are using older version of rails latest version of ruby is 3.2 if you execute this command in latest version

rails new sample -d mysql

then this will create sample directory in current directory so you can reach folder with

cd sample

but you don't need new keyword with older version of rails means you need to just execute following command

rails sample -d mysql

following command will create a new folder and then generate project name sample in new directory so you need cd new/sample for reach directory

rails new sample -d mysql

Upvotes: 1

Gopal S Rathore
Gopal S Rathore

Reputation: 9995

try it :-

1. cd /home/username   `(put your username )`

2. rails new sample -d mysql

Now to check if the folder for app is created or not.

3. ls -l

If the directory with name "sample" is shown then, locate in it

4. cd sample

if Directory does not exists then there can be a problem in ur installation of OS or Rails.

Upvotes: 1

Kushal
Kushal

Reputation: 218

you are saying that your current directory is "/opt/lampp/htdocs". so if you run 'rails new myblog -d mysql' command, then it will generate a project directory structure with parent directory named myblog in your current directory like "/opt/lampp/htdocs/myblog".

Upvotes: 0

Related Questions