JavaFree.org | RubyOnBr.org

Ruby Programming Challenge For Newbies

Acompanhar Ruby Programming Challenge For Newbies 15 posts, 3 participantes

Hugolnxtechnoavatar32x3 HugoLnx 34 posts

Este desafio é uma competição organizada por Fabio Akita e outros.xD
abaixo tem uma descrição do desafio, em inglês.xD
“The Ruby Challenge

RPCFN

Difficulty: Ruby beginner.

Goals: Basic control over Ruby elements, specially command line scripting.

Description: There are several ways to subtitle a movie nowadays, and one of the most well known format is the SubRip format (http://en.wikipedia.org/wiki/SubRip). It has entries like these:"

Se quiserem ver o blog da competição aí esta o link…
http://rubylearning.com/blog/2009/09/24/rpcfn-shift-subtitle-1/

 
Avatar nofxx 1960 posts

Pow, vou ter q fazer um jaba.. primeira gem q eu fiz na vida, foi de legendas =D

http://github.com/nofxx/subtitle_it

 
Avatar nofxx 1960 posts

AE Hugo, falando nisso qdo tu vai rodar um “jeweler tictactoe” ae ?

Instala o jeweler ae.. moh barato =D

PS.: xeu deixa ro link aqui, pq eh moh comedia procurar “ruby gem jeweler” hehe…

http://github.com/technicalpickles/jeweler

 
Hugolnxtechnoavatar32x3 HugoLnx 34 posts

nem precisei baixar isso.xD so mandei um gem install jeweler e instalo a gem.xD
agora so faltar ver como funfa.xD

 
Avatar nofxx 1960 posts

Rodae:

Entra na pasta tictactoe, edita o Rakefile a seu gosto, rake gemspec, rake build… Vc tem uma gem =D

—rspec pra gerar o helperzito de testes com RSpec =D

 
Hugolnxtechnoavatar32x3 HugoLnx 34 posts

ta dando um errosinho.xD
http://img34.imageshack.us/img34/7949/screenerro.png

to tentando resolver.xD

 
Avatar nofxx 1960 posts

nao eh pra criar arquivo nao kra..

jeweler nome da gem

só faz uma vez…
teu codigo deve ficar dentro de lib/

 
Avatar nofxx 1960 posts

Mano , q trampo screenshot… abre uma tag code e cola…

E putis, tomara que o pau seja windows, adoro coisas que nao funcionam no windows =DD

 
Hugolnxtechnoavatar32x3 HugoLnx 34 posts

putz, deve ser no windows mesmo.xD
eu baixei o seu projeto de subtitle pra testar direitinho, aí tentei…

  • dar cd no diretório e mandar “jeweler nofxx_project_text”
  • dar jeweler c:\jeweler nofxx_project_text

nada funfa.xD

 
Hugolnxtechnoavatar32x3 HugoLnx 34 posts

aew, dps eu resolvo isso, agora tenho q ir pra escola.xDDDDD
brigadão pela ajuda kra ^^

 
Avatar nofxx 1960 posts

Nao brod, acho q tu nao entendeu … jeweler eh como um “rails foo” … soh vai gerar um esqueleto pra vc..
Vc faz UMA vez soh, na vida inteira do projeto…. sacou?
Minha subtitle jah eh uma gem.. (mas acho q nao usei jeweler… mto antigo….)

 
Hugolnxtechnoavatar32x3 HugoLnx 34 posts

acho q entendi, então eu do o jeweler num diretório qualquer q ele gera o esqueleto, aí dps é só ir passando meu projeto pro esqueleto.

mas ainda ta dando o mesmo erro.xD


C:\>jeweler GemTemplate
C:/Ruby/lib/ruby/gems/1.8/gems/git-1.2.2/lib/git/lib.rb:700:in `command': git ve
rsion   2>&1:'git' is not recognized as an internal or external command, (Git::G
itExecuteError)
operable program or batch file.
        from C:/Ruby/lib/ruby/gems/1.8/gems/git-1.2.2/lib/git/lib.rb:649:in `cur
rent_command_version'
        from C:/Ruby/lib/ruby/gems/1.8/gems/git-1.2.2/lib/git/lib.rb:659:in `mee
ts_required_version?'
        from C:/Ruby/lib/ruby/gems/1.8/gems/git-1.2.2/lib/git.rb:30
        from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `ge
m_original_require'
        from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `re
quire'
        from C:/Ruby/lib/ruby/gems/1.8/gems/jeweler-1.2.1/bin/../lib/jeweler/gen
erator.rb:1
        from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `ge
m_original_require'
        from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `re
quire'
        from C:/Ruby/lib/ruby/gems/1.8/gems/jeweler-1.2.1/bin/../lib/jeweler.rb:
9
        from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `ge
m_original_require'
        from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `re
quire'
        from C:/Ruby/lib/ruby/gems/1.8/gems/jeweler-1.2.1/bin/jeweler:6
        from C:/Ruby/bin/jeweler:19:in `load'
        from C:/Ruby/bin/jeweler:19

C:\>
 
Avatar nofxx 1960 posts

Ah tah.. o jeweler precisa do git…
Nao tenho a minima ideia como instala git no windwos.

 
Avatar Douglas (dorô) 142 posts

Para usar o git no win instala o msysGit , o pessoal aqui no trampo usa e nao tem muitos problemas.

[]’s

 
Hugolnxtechnoavatar32x3 HugoLnx 34 posts

eu ja tinha instalado jah, mas num tinha botado pra rodar com o prompt do window.xD
aí eu tive q desinstalar e instalar certo.
agora ele ta dizendo q eu num configurei o meu nome, sendo q eu ja configurei. =P


C:\>git config —global user.name = “HugoLnx”

C:\>git config —global user.email = “hugolinux@hotmail.com

C:\>jeweler GemTemplate
No user.name found in ~/.gitconfig. Please tell git about yourself (see http://g
ithub.com/guides/tell-git-your-user-name-and-email-address for details). For exa
mple: git config —global user.name “mad voo”

C:\>