IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Ruby Discussion :

Problème pour faire fonctionner Ruby


Sujet :

Ruby

  1. #1
    Candidat au Club
    Homme Profil pro
    Autonome
    Inscrit en
    Janvier 2015
    Messages
    5
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Canada

    Informations professionnelles :
    Activité : Autonome
    Secteur : Alimentation

    Informations forums :
    Inscription : Janvier 2015
    Messages : 5
    Points : 3
    Points
    3
    Par défaut Problème pour faire fonctionner Ruby
    Bonjour, j'ai récement commencer à apprendre Ruby, mais là j'ai un problème, j'aimerais me pratiquer sur mon PC mais quand je lance ruby dans ma console ruby démarre mais rien de plus, le curseur flash, et il peu faire sa pendant des heures, j'ai essayer avec ruby 1.8 et ruby 1.9.1 et c'est toujours pareil !

    J'ai aussi essayer d'installer Ruby 2.2.0 mais quand je compile et que je fait un make check, j'ai 1 erreur, je ne sais pas laquel mais j'ai suivie la démarche décrite dans le fichier README !

    Donc, si quelqu'un pourrai m'apporter un peu d'aide, se serai grandement aprécier, j'ai chercher sur le site de ruby france, mais à part des apéros, je n'es rien trouvé pour m'aidé !

    Je suis sous Debian Wheezy

    Merci à l'avance !

  2. #2
    Invité
    Invité(e)
    Par défaut
    Bonjour,

    Une erreur en sortie d'un make check ne signifie pas que tu as raté ton installation de Ruby.
    Quelles sont les étapes que tu as fait précisément?

    Cordialement.

  3. #3
    Candidat au Club
    Homme Profil pro
    Autonome
    Inscrit en
    Janvier 2015
    Messages
    5
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Canada

    Informations professionnelles :
    Activité : Autonome
    Secteur : Alimentation

    Informations forums :
    Inscription : Janvier 2015
    Messages : 5
    Points : 3
    Points
    3
    Par défaut
    Merci pour ta réponse.

    En gros, j'ai suivi les étapes du fichier README, j'ai compilé, ensuite j'ai faite make, et un make check, quand j'ai fait "make" je n'ai eu aucun problème, mais il y a l'affaire comme quoi qui manquerai ssl mais je l'ai donc je ne sais pas pourquoi il me parle de openssl, sinon, si le retour de make check n'es pas grave, je peu faire l'étape de make install, mais j'ai un doute, vue que les autres version de ruby ne veullent pas démarrer.

    Je ne sais pas pourquoi sa ne fonctionne pas, si je pourrais avoir des retours sa serai bien, mais j'ai rien.
    Y'a juste le curseur qui flash quand je tape ruby et que je fait enter.

    Merci

  4. #4
    Invité
    Invité(e)
    Par défaut
    Je te conseille de suivre ces étapes :
    https://bugs.ruby-lang.org/projects/...o#how-to-build

    On remarque qu'il faut bien installer des paquets en amont.
    Sur une plateforme Debian on aura un truc du genre :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    apt-get update && apt-get install -y -qq openssl tcl-dev tk-dev libgdbm-dev libssl-dev libedit-dev libffi-dev libyaml-dev
    OpenSSL va servir au programme Gem pour télécharger des bibliothèques externes sur le serveur https://rubygems.org/.

    Ensuite, tu peux passer aux étapes de configuration (./configure), de compilation (make) et d'installation (make install).
    L'étape d'installation s'effectue généralement en root.

    Une fois installé, vérifie la variable d'environnement PATH de ton shell et tape la commande :
    qui devrait te donner la version 2.2.0.

    @+

  5. #5
    Candidat au Club
    Homme Profil pro
    Autonome
    Inscrit en
    Janvier 2015
    Messages
    5
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Canada

    Informations professionnelles :
    Activité : Autonome
    Secteur : Alimentation

    Informations forums :
    Inscription : Janvier 2015
    Messages : 5
    Points : 3
    Points
    3
    Par défaut
    Merci

    J'essaie sa demain, j'ai pas le temps ce soir !

    Merci encore une fois !

  6. #6
    Candidat au Club
    Homme Profil pro
    Autonome
    Inscrit en
    Janvier 2015
    Messages
    5
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Canada

    Informations professionnelles :
    Activité : Autonome
    Secteur : Alimentation

    Informations forums :
    Inscription : Janvier 2015
    Messages : 5
    Points : 3
    Points
    3
    Par défaut
    Salut, j'ai installer se qu'il fallais, mais j'ai toujours le problème de démarrage.

    Le retour pour ruby -v est : ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]

    Sinon, après make, ja'ai fait un make check et voici le retour, avec erreur 32 :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    test succeeded
    PASS all 1008 tests             
    ./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems "./bootstraptest/runner.rb" --ruby="ruby --disable-gems"   ./KNOWNBUGS.rb
    2015-01-15 17:33:53 -0500
    Driver is ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]
    Target is ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]
     
    KNOWNBUGS.rb  PASS 0
    No tests, no problem
    ./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems "./test/runner.rb" --ruby="./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems"  
    Run options: "--ruby=./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems"
     
    # Running tests:
     
    Closed file descriptor: Bug::Marshal::TestUsrMarshal#test_compat: 16   
    [ 2181/15940] Readline::TestHistory#test_delete_at = 0.00 s                                                                                         
      1) Failure:
    Readline::TestHistory#test_delete_at [/home/jo/.local/share/Trash/files/ruby-2.3.2.0/test/readline/test_readline_history.rb:219]:
    <"1:a"> expected but was
    <nil>.
     
    [ 2182/15940] Readline::TestHistory#test_delete_at__out_of_range = 0.00 s
      2) Failure:
    Readline::TestHistory#test_delete_at__out_of_range [/home/jo/.local/share/Trash/files/ruby-2.3.2.0/test/readline/test_readline_history.rb:241]:
    index=<0>.
    [IndexError, NotImplementedError] expected but nothing was raised.
     
    [ 2185/15940] Readline::TestHistory#test_empty_p = 0.00 s                        
      3) Failure:
    Readline::TestHistory#test_empty_p [/home/jo/.local/share/Trash/files/ruby-2.3.2.0/test/readline/test_readline_history.rb:207]:
    Failed assertion, no message given.
     
    [ 2189/15940] Readline::TestHistory#test_length = 0.00 s                   
      4) Failure:
    Readline::TestHistory#test_length [/home/jo/.local/share/Trash/files/ruby-2.3.2.0/test/readline/test_readline_history.rb:196]:
    <0> expected but was
    <5>.
     
    [ 2190/15940] Readline::TestHistory#test_pop = 0.00 s           
      5) Failure:
    Readline::TestHistory#test_pop [/home/jo/.local/share/Trash/files/ruby-2.3.2.0/test/readline/test_readline_history.rb:151]:
    <"5:e"> expected but was
    <"4:d">.
     
    [ 2196/15940] Readline::TestHistory#test_shift = 0.00 s                    
      6) Failure:
    Readline::TestHistory#test_shift [/home/jo/.local/share/Trash/files/ruby-2.3.2.0/test/readline/test_readline_history.rb:166]:
    <"1:a"> expected but was
    <nil>.
     
    [ 3374/15940] TestDBM_RDONLY#test_delete_rdonly = 0.16 s                                                                                           
      7) Failure:
    TestDBM_RDONLY#test_delete_rdonly [/home/jo/.local/share/Trash/files/ruby-2.3.2.0/test/dbm/test_dbm.rb:50]:
    DBMError expected but nothing was raised.
     
    [ 4644/15940] TestFind#test_unreadable_dir = 0.00 s                                                                                   
      8) Failure:
    TestFind#test_unreadable_dir [/home/jo/.local/share/Trash/files/ruby-2.3.2.0/test/test_find.rb:102]:
    <["/tmp/d20150115-16362-ktoo1r", "/tmp/d20150115-16362-ktoo1r/dir"]> expected but was
    <["/tmp/d20150115-16362-ktoo1r",
     "/tmp/d20150115-16362-ktoo1r/dir",
     "/tmp/d20150115-16362-ktoo1r/dir/foo"]>.
     
    [ 4645/15940] TestFind#test_unsearchable_dir = 0.00 s      
      9) Failure:
    TestFind#test_unsearchable_dir [/home/jo/.local/share/Trash/files/ruby-2.3.2.0/test/test_find.rb:149]:
    Exception(Errno::EACCES) with message matches to /\/tmp\/d20150115\-16362\-mdjx4k\/dir\/foo/.
    Errno::EACCES expected but nothing was raised.
     
    [ 5171/15940] TestGDBM#test_s_open_error = 0.13 s                                                                     
     10) Failure:
    TestGDBM#test_s_open_error [/home/jo/.local/share/Trash/files/ruby-2.3.2.0/test/gdbm/test_gdbm.rb:206]:
    [Errno::EACCES, Errno::EAGAIN] expected but nothing was raised.
     
    [ 5192/15940] TestGDBM_RDONLY#test_delete_rdonly = 0.15 s          
     11) Failure:
    TestGDBM_RDONLY#test_delete_rdonly [/home/jo/.local/share/Trash/files/ruby-2.3.2.0/test/gdbm/test_gdbm.rb:45]:
    GDBMError expected but nothing was raised.
     
    [ 5264/15940] TestGem#test_self_ensure_gem_directories_write_protected = 0.00 s        
     12) Failure:
    TestGem#test_self_ensure_gem_directories_write_protected [/home/jo/.local/share/Trash/files/ruby-2.3.2.0/test/rubygems/test_gem.rb:391]:
    Failed refutation, no message given
     
    [ 5280/15940] TestGem#test_self_ensure_gem_directories_write_protected_parents = 0.00 s
     13) Failure:
    TestGem#test_self_ensure_gem_directories_write_protected_parents [/home/jo/.local/share/Trash/files/ruby-2.3.2.0/test/rubygems/test_gem.rb:408]:
    Failed refutation, no message given
     
    [ 5400/15940] TestGemCommandsCleanupCommand#test_execute_all_user_no_sudo = 0.18 s                      
     14) Failure:
    TestGemCommandsCleanupCommand#test_execute_all_user_no_sudo [/home/jo/.local/share/Trash/files/ruby-2.3.2.0/test/rubygems/test_gem_commands_cleanup_command.rb:112]:
    Expected path '/tmp/test_rubygems_16362/gemhome/gems/a-1' to exist.
     
    [ 5487/15940] TestGemCommandsInstallCommand#test_execute_no_user_install = 0.08 s                                  
     15) Failure:
    TestGemCommandsInstallCommand#test_execute_no_user_install [/home/jo/.local/share/Trash/files/ruby-2.3.2.0/test/rubygems/test_gem_commands_install_command.rb:117]:
    [Gem::FilePermissionError] exception expected, not
    Class: <Gem::MockGemUi::SystemExitException>
    Message: <"Gem::MockGemUi::SystemExitException">
    ---Backtrace---
    /home/jo/.local/share/Trash/files/ruby-2.3.2.0/lib/rubygems/mock_gem_ui.rb:84:in `terminate_interaction'
    /home/jo/.local/share/Trash/files/ruby-2.3.2.0/lib/rubygems/user_interaction.rb:158:in `terminate_interaction'
    /home/jo/.local/share/Trash/files/ruby-2.3.2.0/lib/rubygems/commands/install_command.rb:206:in `execute'
    /home/jo/.local/share/Trash/files/ruby-2.3.2.0/test/rubygems/test_gem_commands_install_command.rb:118:in `block (2 levels) in test_execute_no_user_install'
    ---------------
     
    [ 5855/15940] TestGemInstallUpdateOptions#test_user_install_disabled_read_only = 0.08 s                                 
     16) Failure:
    TestGemInstallUpdateOptions#test_user_install_disabled_read_only [/home/jo/.local/share/Trash/files/ruby-2.3.2.0/test/rubygems/test_gem_install_update_options.rb:151]:
    Gem::FilePermissionError expected but nothing was raised.
     
    [ 5873/15940] TestGemInstaller#test_generate_bin_script_no_perms = 0.02 s                         
     17) Failure:
    TestGemInstaller#test_generate_bin_script_no_perms [/home/jo/.local/share/Trash/files/ruby-2.3.2.0/test/rubygems/test_gem_installer.rb:424]:
    Gem::FilePermissionError expected but nothing was raised.
     
    [ 5914/15940] TestGemInstaller#test_generate_bin_symlink_no_perms = 0.02 s                           
     18) Failure:
    TestGemInstaller#test_generate_bin_symlink_no_perms [/home/jo/.local/share/Trash/files/ruby-2.3.2.0/test/rubygems/test_gem_installer.rb:516]:
    Gem::FilePermissionError expected but nothing was raised.
     
    [ 6072/15940] TestGemRDoc#test_setup_unwritable = 0.06 s                                             
     19) Failure:
    TestGemRDoc#test_setup_unwritable [/home/jo/.local/share/Trash/files/ruby-2.3.2.0/test/rubygems/test_gem_rdoc.rb:256]:
    Gem::FilePermissionError expected but nothing was raised.
     
    [ 6073/15940] TestGemRDoc#test_remove_unwritable = 0.10 s       
     20) Failure:
    TestGemRDoc#test_remove_unwritable [/home/jo/.local/share/Trash/files/ruby-2.3.2.0/test/rubygems/test_gem_rdoc.rb:228]:
    Gem::FilePermissionError expected but nothing was raised.
     
    [ 6087/15940] TestGemRemoteFetcher#test_download_local_read_only = 0.09 s                                
     21) Failure:
    TestGemRemoteFetcher#test_download_local_read_only [/home/jo/.local/share/Trash/files/ruby-2.3.2.0/test/rubygems/test_gem_remote_fetcher.rb:346]:
    --- expected
    +++ actual
    @@ -1 +1 @@
    -"/tmp/test_rubygems_16362/a-1.gem"
    +"/tmp/test_rubygems_16362/gemhome/cache/a-1.gem"
     
     
    [ 6088/15940] TestGemRemoteFetcher#test_download_read_only = 0.02 s              
     22) Failure:
    TestGemRemoteFetcher#test_download_read_only [/home/jo/.local/share/Trash/files/ruby-2.3.2.0/test/rubygems/test_gem_remote_fetcher.rb:359]:
    Failed assertion, no message given.
     
    [ 6734/15940] TestGemSpecification#test_build_extensions_extensions_dir_unwritable = 0.14 s                
     23) Failure:
    TestGemSpecification#test_build_extensions_extensions_dir_unwritable [/home/jo/.local/share/Trash/files/ruby-2.3.2.0/test/rubygems/test_gem_specification.rb:1253]:
    Expected path '/tmp/test_rubygems_16362/gemhome/extensions/x86-darwin-8/2.2.0-static/ext-1' to not exist.
     
    [ 9546/15940] TestPathname#test_find = 0.00 s                                                                                  
     24) Failure:
    TestPathname#test_find [/home/jo/.local/share/Trash/files/ruby-2.3.2.0/test/pathname/test_pathname.rb:1301]:
    Exception(Errno::EACCES) with message matches to /d\/x/.
    Errno::EACCES expected but nothing was raised.
     
    [ 9622/15940] TestPathname#test_realpath = 0.00 s                           
     25) Failure:
    TestPathname#test_realpath [/home/jo/.local/share/Trash/files/ruby-2.3.2.0/test/pathname/test_pathname.rb:405]:
    Errno::EACCES expected but nothing was raised.
     
    [ 9846/15940] TestProcess#test_execopts_uid = 0.07 s                                                  
     26) Failure:
    TestProcess#test_execopts_uid [/home/jo/.local/share/Trash/files/ruby-2.3.2.0/test/ruby/test_process.rb:1622]:
    [ruby-core:47414].
    Exception raised:
    <#<Errno::EACCES: Permission denied - /home/jo/.local/share/Trash/files/ruby-2.3.2.0/ruby>>.
     
    [11262/15940] TestRDocOptions#test_check_files = 0.00 s                                                          
     27) Failure:
    TestRDocOptions#test_check_files [/home/jo/.local/share/Trash/files/ruby-2.3.2.0/test/rdoc/test_rdoc_options.rb:32]:
    Expected ["unreadable"] to be empty.
     
    [11604/15940] TestRDocRDoc#test_parse_file_forbidden = 0.00 s                                                         
     28) Failure:
    TestRDocRDoc#test_parse_file_forbidden [/home/jo/.local/share/Trash/files/ruby-2.3.2.0/test/rdoc/test_rdoc_rdoc.rb:285]:
    Expected /Unable\ to\ read\ \/tmp\/test\.txt20150115\-16362\-11awgwc,/ to match "".
     
    Leaked tempfile: TestRDocRDoc#test_parse_file_forbidden: #<Tempfile:/tmp/test.txt20150115-16362-11awgwc (closed)>
    [11834/15940] TestRDocRubygemsHook#test_remove_unwritable = 0.07 s                            
     29) Failure:
    TestRDocRubygemsHook#test_remove_unwritable [/home/jo/.local/share/Trash/files/ruby-2.3.2.0/test/rdoc/test_rdoc_rubygems_hook.rb:210]:
    Gem::FilePermissionError expected but nothing was raised.
     
    [11835/15940] TestRDocRubygemsHook#test_setup_unwritable = 0.09 s         
     30) Failure:
    TestRDocRubygemsHook#test_setup_unwritable [/home/jo/.local/share/Trash/files/ruby-2.3.2.0/test/rdoc/test_rdoc_rubygems_hook.rb:238]:
    Gem::FilePermissionError expected but nothing was raised.
     
    [13301/15940] TestSDBM#test_readonly = 0.02 s                                                                                     
     31) Failure:
    TestSDBM#test_readonly [/home/jo/.local/share/Trash/files/ruby-2.3.2.0/test/sdbm/test_sdbm.rb:526]:
    SDBMError expected but nothing was raised.
     
    [13305/15940] TestSDBM#test_s_open_error = 0.02 s              
     32) Failure:
    TestSDBM#test_s_open_error [/home/jo/.local/share/Trash/files/ruby-2.3.2.0/test/sdbm/test_sdbm.rb:111]:
    Errno::EACCES expected but nothing was raised.
     
    Finished tests in 625.298846s, 25.4918 tests/s, 4564.3024 assertions/s.                                               
    15940 tests, 2854053 assertions, 32 failures, 0 errors, 40 skips
     
    ruby -v: ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]
    make: *** [yes-test-all] Erreur 32
    Mais pour savoir, quand je suis dans mon terminal (console) pour démarrer ruby, c'est comme python ? Il faut juste taper ruby et faire enter ?


    Merci !

  7. #7
    Invité
    Invité(e)
    Par défaut
    Bonsoir,

    Je connais pas Python.
    Avec Ruby, soit tu édites un fichier avec une extension .rb et tu donnes ça à l'executable ruby:
    Soit tu lances un autre executable qui s'appel IRB pour "Interactive Ruby" qui interprète à la volée:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    irb
    irb(main):001:0> puts "coucou"
    coucou
    => nil
    irb(main):002:0> exit
    @+

  8. #8
    Candidat au Club
    Homme Profil pro
    Autonome
    Inscrit en
    Janvier 2015
    Messages
    5
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Canada

    Informations professionnelles :
    Activité : Autonome
    Secteur : Alimentation

    Informations forums :
    Inscription : Janvier 2015
    Messages : 5
    Points : 3
    Points
    3
    Par défaut
    IRB ! C'est ce que je cherchais.

    Merci beaucoup beaucoup pour ton aide

    Mais j'aurais une dernière question, aurai tu un bon IDE à me conseiller, j'utilise Geany mais j'aimerais en essayer d'autres. J'ai chercher un peu sur le net, mais je ne trouve pas vraiment.

  9. #9
    Invité
    Invité(e)
    Par défaut
    Regarde en bas de cette page il y a une liste d'IDE
    https://www.ruby-lang.org/en/documentation/

    J'utilise aussi Geany que j'ai personnalisé qui me convient car je ne fais pas que du Ruby.
    Ceux qui reviennent souvent chez les developpeurs Ruby, c'est VIM, Sublime Text et le top c'est RubyMine mais il est payant.

    @+

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Problème pour faire fonctionner un EJB3
    Par Payton3IL dans le forum Java EE
    Réponses: 0
    Dernier message: 16/02/2012, 20h30
  2. Réponses: 2
    Dernier message: 24/01/2012, 12h25
  3. Réponses: 3
    Dernier message: 21/11/2011, 11h54
  4. Réponses: 6
    Dernier message: 07/05/2010, 11h48
  5. Problème pour faire fonctionner OpenVpn.
    Par pcsystemd dans le forum Administration système
    Réponses: 1
    Dernier message: 29/08/2007, 01h27

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo