Probleme mit RVM und Rails beim Erstellen einer neuen App

Probleme mit RVM und Rails beim Erstellen einer neuen App

Beim Versuch rails new myapp, dies unter diesem Pfad zu tun: /home/novito/Projecteserhalte ich die folgende Fehlermeldung:

Can't initialize a new Rails application within the directory of another, please change to a non-Rails directory first.
Type 'rails' for help.

Ich habe mir vorgestellt, dass ich vielleicht eine Rails-App in meinem Home-Ordner erstellt oder kopiert habe. Also gehe ich dorthin und dies ist die Liste, die ich habe, wenn ichls -la

drwxr-xr-x  2 novito novito   4096 2012-01-07 18:33 Audiobooks
-rw-r--r--  1 novito novito 604710 2011-06-17 15:54 brasero-session.log
drwxr-xr-x  7 root   root     4096 2011-11-26 23:52 build
drwxr-xr-x  5 novito novito   4096 2011-07-26 19:35 bumblebee
d    rwxr-xr-x  6 novito novito   4096 2012-02-15 06:23 config
-rw-r--r--  1 novito novito    157 2012-01-30 21:17 config.ru
drwxr-xr-x 19 novito novito   4096 2012-02-15 00:32 Desktop
-rwxr-xr-x  1 novito novito    409 2011-09-18 11:29 django.fcgi
drwxr-xr-x  9 novito novito   4096 2012-02-09 18:35 Documents
drwxr-xr-x  2 novito novito  16384 2012-02-14 03:11 Downloads
drwx------ 10 novito novito   4096 2012-02-13 20:12 Dropbox
-rw-r--r--  1 novito novito    179 2011-06-15 13:39 examples.desktop
drwxr-xr-x  2 novito novito   4096 2012-01-30 21:41 gmate
drwxr-xr-x  4 novito novito   4096 2011-06-30 11:09 Music
drwxr-xr-x 17 novito novito   4096 2011-08-21 10:27 Música
drwxr-xr-x 10 novito novito   4096 2011-11-01 10:30 netbeans-7.0.1
drwxr-xr-x  3 novito novito   4096 2011-11-01 10:32 NetBeansProjects
drwxr-xr-x  6 novito novito   4096 2011-11-20 16:18 opt
drwxr-xr-x  5 novito novito   4096 2012-01-16 01:57 Pictures
drwxr-xr-x 27 novito novito   4096 2012-02-15 06:07 Projectes
drwxr-xr-x  2 novito novito   4096 2011-06-15 11:59 Public
-rw-r--r--  1 novito novito   9208 2012-01-30 21:17 README
drwxr-xr-x  2 novito novito   4096 2011-12-25 09:49 Schemes
drwxr-xr-x  2 novito novito   4096 2012-01-30 21:17 script
drwxr-xr-x  3 novito novito   4096 2011-06-16 23:24 Software
drwxr-xr-x  2 novito novito   4096 2011-06-15 11:59 Templates
drwxr-xr-x  8 novito novito   4096 2012-01-30 21:17 test
drwxr-xr-x  2 novito novito   4096 2012-02-10 20:24 TESTRAILS
drwxr-xr-x  6 novito novito   4096 2012-01-31 00:41 tmp
drwxrwxr-x  2 novito novito   4096 2011-06-15 11:56 Ubuntu One
drwxr-xr-x  4 novito novito   4096 2012-01-30 21:17 vendor
drwxr-xr-x  4 novito novito   4096 2012-01-14 16:02 Videos
drwxr-xr-x  2 novito novito   4096 2012-01-07 18:33 Vídeos
drwxr-xr-x  6 novito novito   4096 2011-11-10 22:55 workspace

Also habe ich versucht, „Config“ und „Vendor“ zu löschen, da es sich dabei um andere Ordner handelt, die mit der Rails-App in Zusammenhang stehen. Wenn ich jedoch „Config“ lösche und versuche, „Rails neu“ zu erstellen, erhalte ich diese Fehlermeldung:

<internal:lib/rubygems/custom_require>:29:in `require': no such file to load -- /home/novito/config/boot (LoadError)
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from script/rails:5:in `<main>'

Ich weiß nicht wirklich, was hier los ist. Wenn mir jemand Tipps geben könnte, wäre ich sehr dankbar.

Antwort1

Diese Frage könnte auf www.stackoverflow.com übertragen werden.

Sie haben wahrscheinlich eine andere Rails-App im Ordner /home/novito/Projectes/.

Sehen Sie sich die Antwort hier an (ich weiß nicht, ob sie damit zusammenhängt):https://stackoverflow.com/questions/3865515/strange-inability-to-require-config-boot-after-upgrading-to-ruby-1-9-2

Ich verwende Ruby/Rails nicht, aber wenn das oben genannte nicht funktioniert, müssen Sie, glaube ich, die mit RVM heruntergeladene Ruby-Version neu installieren:http://beginrescueend.com/

rvm implode
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
rvm requirements # Find the requirements (follow the instructions)
rvm install 1.9.3 # Change 1.9.3 with your version

Mehr zu RVM (siehe „Grundlagen“):http://beginrescueend.com/rvm/

Versuchen Sie es dann erneut:

reset
mkdir -p /home/novito/Projectes/mynewrailapp
which ruby #check you are using the correct version of ruby
which rails #check you are using the correct version of rails
rails new myapp /home/novito/Projectes/mynewrailapp

verwandte Informationen