Hello All! I just started learning Ruby on Rails and loving it. I''ve run into several issues that seemed insurmountable, but with all the info out there I have been able to figure out my problem on my own... until now! I am on a Mac 10.7.5, ruby 2.0.0p195, rails 3.2.13 I am trying to create a new project but I get the following "error": Can''t initialize a new Rails application within the directory of another, please change to a non-Rails directory first. Type ''rails'' for help. Some more background: 1. When everything was working OK, I wrote this: rails new profile After that I noticed my "computer''s" name in the terminal window went from: Tjtog-iMac:~ tejasmehta$ TO Tjtog-iMac:profile tejasmehta$ I searched online for hours and can''t find a way to solve this on my end. Suggestions? Any help is crazy appreciated. Best, TJ -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/31acc29c-5150-44eb-93d9-08a7d7b7a5aa%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Your computer name did not change. Your computer name is Tjtog-iMac. The part after the ":" is the directory you are in. At first you were in "~" which is your home directory. Then you were in "profile" which is the directory of the rails app you created. Can you confirm what directory you are in when you try to create a new app and get the error? What is the output of the "pwd" command? What is the output of the "ls" command? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/e4329589-4fd9-42d9-99e2-096239b7db4c%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Here''s what I think happened. You created your first Ruby application called "profile".. it generated successfully and terminal opened up the directory. Now you want to create another rails app, but terminal is still in that rails directory of "profile" (hence the name profile next to your imac''s name). To get out of it, type "cd ~/Desktop" (which stands for "change directory" and that will change the directory to your desktop. Then type "rails new {name}" for your next app, and it should work again! If you find yourself having trouble with this, I recommend going through the first chapters of the Rails Tutorial book by Michael Hartl. If I remember correctly, he discusses the command prompts and other stuff around ruby and rails at great lengths. Let me know if this worked out for you, otherwise we''ll have to find another solution! -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/5e6ce579cb6df54d39330fd645329dd1%40ruby-forum.com. For more options, visit https://groups.google.com/groups/opt_out.
Your issue isn''t really with rails, it''s in understanding the *nix directory structure and how to use the command line, I think. If you open your Finder, and go to your home directory, you will probably see a folder there called "profile". When you are in the Terminal, the prompt: Tjtog-iMac:~ tejasmehta$ refers to: your machine name: Tjtog-iMac ~: shorthand for your home directory tejasmehta: your user name I''m assuming when you created the rails app profile, it created a folder ''profile'' under your home directory. to make a new app, go back to your home directory (or another directory other than ''profile'') and run the rails new app again. I would strongly suggest getting the Mac Missing Manual for your edition of OS/X and read through it. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/51bfd7f4.e370320a.277b.5b1e%40mx.google.com. For more options, visit https://groups.google.com/groups/opt_out.