# Rails/Rake wrongly interpreting command-line?

**URL:** <https://www.ruby-forum.com/t/rails-rake-wrongly-interpreting-command-line/171638>\
**Category:** Rails\
**Created:** [July 7, 2009, 12:01am UTC](https://www.ruby-forum.com/t/rails-rake-wrongly-interpreting-command-line/171638 "2009-07-07T00:01:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![greg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@greg](https://www.ruby-forum.com/u/greg)\
**Post date:** [July 7, 2009, 12:01am UTC](https://www.ruby-forum.com/t/rails-rake-wrongly-interpreting-command-line/171638/1 "2009-07-07T00:01:00Z")

</div>

Hi,

I’ve been struggling to get Rails working properly on my Ubuntu box  
for a couple of weeks now - driving me mad…

The current problem is that the “rails” and “rake” commands seem to be  
wrongly intrepreting the command-line. For example, if I type:

~/$rails blog -d mysql

What I get is a directory called “blog” with a bunch of stuff in it  
AND a directory called “mysql” with the same bunch of stuff!

also, if after setting up database.yml correctly, then do

~/blog$rake db:create

what I get is yet another directory full of rubbish created also  
called “db:create”! Gaaaghhh!

The annoying thing is, I’ve tried _completely_ uninstalling ruby,  
rails and rake and re-installing… AND it’s still like this!!!

Help. Please.

(I’m sure I’m doing something really dumb, or missing something dumb,  
but I can’t see it now for the red mist… gonna give up and go back  
to struts… … …)

Thanks,  
Geg

---

<div class="post-metadata">

**Author:** ![greg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@greg](https://www.ruby-forum.com/u/greg)\
**Post date:** [July 7, 2009, 2:21am UTC](https://www.ruby-forum.com/t/rails-rake-wrongly-interpreting-command-line/171638/2 "2009-07-07T02:21:57Z")

</div>

Greg wrote:

> Hi,
> 
> I’ve been struggling to get Rails working properly on my Ubuntu box  
> for a couple of weeks now - driving me mad…
> 
> The current problem is that the “rails” and “rake” commands seem to be  
> wrongly intrepreting the command-line. For example, if I type:
> 
> ~/$rails blog -d mysql
> 
> What I get is a directory called “blog” with a bunch of stuff in it  
> AND a directory called “mysql” with the same bunch of stuff!

Try -dmysql without the space and see what happens.

> also, if after setting up database.yml correctly, then do
> 
> ~/blog$rake db:create
> 
> what I get is yet another directory full of rubbish created also  
> called “db:create”! Gaaaghhh!

And what is in that directory? That might help diagnose the problem.

Also, what versions of Ruby, Gem, and Rake do you have installed?

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![greg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@greg](https://www.ruby-forum.com/u/greg)\
**Post date:** [July 7, 2009, 11:43am UTC](https://www.ruby-forum.com/t/rails-rake-wrongly-interpreting-command-line/171638/3 "2009-07-07T11:43:40Z")

</div>

Hi,

Both commands (rake and rails) create a full new application directory  
structure. So

~/$rails blog -d mysql

Creates two directories populated with new app sructure, one called  
“blog” and one called “mysql”

~/blog$rake db:create

Creates a new app structure called “db:create”.

I’ve also tried

~/$rails blog -dmysql

This gives invalid option errors.

Versions:  
rake 0.8.1  
ruby 1.8.7  
rails 2.1.0

These were all installed using the Ubuntu package manager, but  
previously I have installed using gems, but still had the same  
problem.

Ubuntu is running inside a virtual machine (VirtualBox), but I can’t  
see why that should be a problem (at least not of this nature)…?

Thanks,  
Greg

On Jul 7, 1:21 am, Marnen Laibow-Koser \<rails-mailing-l…@andreas-

---

<div class="post-metadata">

**Author:** ![greg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@greg](https://www.ruby-forum.com/u/greg)\
**Post date:** [July 7, 2009, 5:13pm UTC](https://www.ruby-forum.com/t/rails-rake-wrongly-interpreting-command-line/171638/4 "2009-07-07T17:13:59Z")

</div>

Hi,

Thanks for your help. I solved the problem by completely removing all  
traces of rails, ruby, rake and gems from the system and then starting  
over, following the instructions given here:

[http://wiki.rubyonrails.org/getting-started/installation/linux](http://wiki.rubyonrails.org/getting-started/installation/linux)

to the letter. It appears there are a number of ways to install rails  
on Ubuntu, several of them “recommended” on various websites, but this  
is the only way that worked for me…

Thanks again for your help,  
Greg
