Je suis complètement nouveau à RoR et n'ai pas beaucoup d'expérience de développement de Web. J'abandonne habituellement à ce stade, mais j'ai besoin d'un environnement de développement RoR pour un travail et je ne peux pas choisir le cerveau du créateur du site parce qu'il est quelqu'un à l'extérieur de la société et a fait comprendre qu'il ne connaît pas Windows. sur un mac et je commence à voir pourquoi ...). C'est la première fois l'affichage donc être gentil ...Ruby DevKit ne fonctionne pas pour RedCloth et d'autres gems sur Windows XP
Objectif: être en mesure d'afficher un site basé RoR sur la machine locale, en utilisant de préférence une pré-existante XAMMP Server, mais en utilisant le serveur rails serait bien trop .
Environnement: Windows XP XAMMP 1.7.3 Ruby 9.1.2 DevKit 4.5.0.
Ce que j'ai essayé: J'ai commencé avec suivant les instructions dans ce tutoriel (Installer Xampp et Rails sur une machine Windows http://www.grapethinking.com/getting-rails-to-work-on-a-windows-machine-running-xampp). J'ai franchi toutes les étapes avec succès et j'ai pu créer une application rails et voir la page "Welcome Aboard".
J'ai reçu une copie locale du site de heroku (http://heroku.com/), le service d'hébergement qu'ils utilisent. J'ai modifié le fichier de configuration apache pour qu'il pointe vers le dossier public du site comme décrit à l'étape 5 du tutoriel Xampp and Rails. A ce stade, je suis arrivé le message suivant lors du passage à localhost: 3000
Access forbidden!
You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.
If you think this is a server error, please contact the webmaster.
Error 403
localhost
11/4/2010 2:19:12 PM
Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1
Je ne savais pas comment changer les autorisations sur une machine Windows ou si cela était encore le problème. J'ai essayé de courir « rails de », qui se plaignaient:
Could not find RedCloth-4.2.3 in any of the sources, Try running 'bundle install'.
Je trouve cet article qui décrit ma situation (http://www.ruby-forum.com/topic/204455) qui m'a amené à télécharger le DevKit. À ce stade, j'ai désinstallé ruby et l'ai réinstallé avec le bon installateur. J'ai installé le devkit en suivant les instructions sur leur site (https://github.com/oneclick/rubyinstaller/wiki/Development-Kit).
Le DevKit ne fonctionne pas. Le fichier config.yml a automagiquement l'emplacement où j'ai installé ruby (dans .... xampp/ruby / Ruby192) et il a couru sans se plaindre, sauf lors de l'étape 5 où vous testez pour voir s'il a réellement fonctionné avec la commande "gem install rdiscount --platform = rubis » qui a produit l'erreur suivante:
C:\RubyDevKit>gem install rdiscount --platform=ruby
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing rdiscount:
ERROR: Failed to build gem native extension.
"C:/Documents and Settings/Lyla/My Documents/new/XAMPP_Server_2010/XAMPP_Install
/xampp/ruby/Ruby192/bin/ruby.exe" extconf.rb
checking for random()... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Documents and Settings/Lyla/My Documents/new/XAMPP_Server_2010
/XAMPP_Install/xampp/ruby/Ruby192/bin/ruby
--with-rdiscount-dir
--without-rdiscount-dir
--with-rdiscount-include
--without-rdiscount-include=${rdiscount-dir}/include
--with-rdiscount-lib
--without-rdiscount-lib=${rdiscount-dir}/lib
C:/Documents and Settings/Lyla/My Documents/new/XAMPP_Server_2010/XAMPP_Install/
xampp/ruby/Ruby192/lib/ruby/1.9.1/mkmf.rb:368:in `try_do': The complier failed t
o generate an executable file. (RuntimeError)
You have to install development tools first.
from C:/Documents and Settings/Lyla/My Documents/new/XAMPP_Server_2010/X
AMPP_Install/xampp/ruby/Ruby192/lib/ruby/1.9.1/mkmf.rb:435:in `try_link0'
from C:/Documents and Settings/Lyla/My Documents/new/XAMPP_Server_2010/X
AMPP_Install/xampp/ruby/Ruby192/lib/ruby/1.9.1/mkmf.rb:440:in `try_link'
from C:/Documents and Settings/Lyla/My Documents/new/XAMPP_Server_2010/X
AMPP_Install/xampp/ruby/Ruby192/lib/ruby/1.9.1/mkmf.rb:552:in `try_func'
from C:/Documents and Settings/Lyla/My Documents/new/XAMPP_Server_2010/X
AMPP_Install/xampp/ruby/Ruby192/lib/ruby/1.9.1/mkmf.rb:797:in `block in have_fun
c'
from C:/Documents and Settings/Lyla/My Documents/new/XAMPP_Server_2010/X
AMPP_Install/xampp/ruby/Ruby192/lib/ruby/1.9.1/mkmf.rb:693:in `block in checking
_for'
from C:/Documents and Settings/Lyla/My Documents/new/XAMPP_Server_2010/X
AMPP_Install/xampp/ruby/Ruby192/lib/ruby/1.9.1/mkmf.rb:280:in `block (2 levels)
in postpone'
from C:/Documents and Settings/Lyla/My Documents/new/XAMPP_Server_2010/X
AMPP_Install/xampp/ruby/Ruby192/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from C:/Documents and Settings/Lyla/My Documents/new/XAMPP_Server_2010/X
AMPP_Install/xampp/ruby/Ruby192/lib/ruby/1.9.1/mkmf.rb:280:in `block in postpone
'
from C:/Documents and Settings/Lyla/My Documents/new/XAMPP_Server_2010/X
AMPP_Install/xampp/ruby/Ruby192/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from C:/Documents and Settings/Lyla/My Documents/new/XAMPP_Server_2010/X
AMPP_Install/xampp/ruby/Ruby192/lib/ruby/1.9.1/mkmf.rb:276:in `postpone'
from C:/Documents and Settings/Lyla/My Documents/new/XAMPP_Server_2010/X
AMPP_Install/xampp/ruby/Ruby192/lib/ruby/1.9.1/mkmf.rb:692:in `checking_for'
from C:/Documents and Settings/Lyla/My Documents/new/XAMPP_Server_2010/X
AMPP_Install/xampp/ruby/Ruby192/lib/ruby/1.9.1/mkmf.rb:796:in `have_func'
from extconf.rb:5:in `<main>'
Gem files will remain installed in C:/Documents and Settings/Lyla/My Documents/n
ew/XAMPP_Server_2010/XAMPP_Install/xampp/ruby/Ruby192/lib/ruby/gems/1.9.1/gems/r
discount-1.6.5 for inspection.
Results logged to C:/Documents and Settings/Lyla/My Documents/new/XAMPP_Server_2
010/XAMPP_Install/xampp/ruby/Ruby192/lib/ruby/gems/1.9.1/gems/rdiscount-1.6.5/ex
t/gem_make.out
il a le « améliorer temporairement PATH pour inclure DevKit ... » mais rien ne fonctionne. Une erreur similaire se produit lors de l'installation de RedCloth.
J'ai trouvé ce post qui semble très lié, mais il est pour obtenir gem DBD-odbc, quel qu'il soit, au travail et la solution semble peu spécifique que: I can't get the ruby development kit working for Windows XP
Je ne savais pas ce qu'il parlait avec la modification du fichier fstab ... peut-être que cela m'aiderait? Malheureusement, je ne trouve pas le fichier fstab, je n'ai pas de dossier msys dans mon dossier racine devkit. Je ne trouve pas gcc.bat, make.bat ou sh.bat dans mon dossier bin de ruby install ou dans les divers dossiers bin de devkit.
Il y a aussi ce post (http://www.ruby-forum.com/topic/186191) qui suggère quelques trucs que je ne peux pas vraiment suivre ... c'est aussi tout à partir de 2009 donc j'ai pensé qu'il pourrait être vieux.
aide et merci!
Je recevais ce message d'erreur "Vous devez d'abord installer les outils de développement." aussi, même s'il me disait dès le départ "Amélioration temporaire de PATH pour inclure DevKit ...". Il s'est avéré que j'avais la mauvaise version de devkit, j'avais besoin du devkit "tdm" pour ruby 1.9, pas du dernier devkit qui est seulement pour ruby 2.0. – Ninjaxor