Forum: Ruby on Rails ANN: svn_conf generator -- making "svn import" easy and fun

Posted by Roustem Karimov (Guest)
on 2006-04-26 05:34
(Received via mailing list)
Rails make it easy to start a new application. At the same time, import
a new project into Subversion is not that simple -- there are quite few
files that should be ignored.

I used to manually remove added log files and tmp/cache, tmp/sessions,
tmp/sockets files after the import and then go through the painful
process of setting svn:ignore properties.

There is an easier way -- simply create .cvsignore files before the
import and svn will honor them.

I created svn_conf generator which will add a new rake task to your
project to automate this. I hope you will find it useful.

Instructions:

1. Install svn_conf generator

gem install --source http://dist.agilewebsolutions.com/
svn_conf_generator-0.0.2.gem svn_conf_generator

2. Generate svn_conf in a new rails project (not imported into svn)

./script/generate svn_conf

3. Run svn:configure task to create .cvsignore files

rake svn:configure


Best regards, Roustem

roustem.karimov@agilewebsolutions.com
Posted by Arie Kusuma Atmaja (Guest)
on 2006-04-26 05:49
(Received via mailing list)
wow! Great! i think i need it much

Roustem Karimov wrote:
> 
> I created svn_conf generator which will add a new rake task to your  
> project to automate this. I hope you will find it useful.
> 
> Instructions:
> 
> 1. Install svn_conf generator
> 
> gem install --source http://dist.agilewebsolutions.com/ 
> svn_conf_generator-0.0.2.gem svn_conf_generator

id-ruby:~ arie$ sudo gem install --source
http://dist.agilewebsolutions.com/ svn_conf_generator-0.0.2.gem
svn_conf_generator
Attempting local installation of 'svn_conf_generator-0.0.2.gem'
Local gem file not found: svn_conf_generator-0.0.2.gem*.gem
Attempting remote installation of 'svn_conf_generator-0.0.2.gem'
Updating Gem source index for: http://dist.agilewebsolutions.com/
ERROR:  While executing gem ... (OpenURI::HTTPError)
     404 Not Found
id-ruby:~ arie$ sudo gem install svn_conf_generator --source
http://dist.agilewebsolutions.com/
Attempting local installation of 'svn_conf_generator'
Local gem file not found: svn_conf_generator*.gem
Attempting remote installation of 'svn_conf_generator'
Updating Gem source index for: http://dist.agilewebsolutions.com/
ERROR:  While executing gem ... (OpenURI::HTTPError)
     404 Not Found
id-ruby:~ arie$

what am i doing wrong??

> Best regards, Roustem
> 
> roustem.karimov@agilewebsolutions.com


--
sig "kind regards" :name => "Arie Kusuma Atmaja", :callme => "Arie",
:yahoo_messenger => "riyari3", :email => "ariekusumaatmaja@gmail.com",
:blog => %Q~ http://ariekusumaatmaja.wordpress.com ~

haree genee pake (as|ph)p ?
siape lu mo bikin framework Ruby test/unit pake php :p
Posted by Roustem Karimov (Guest)
on 2006-04-26 05:55
(Received via mailing list)
On Wednesday, April 26, 2006, at 10:46 AM, Arie Kusuma Atmaja wrote:
...
>http://dist.agilewebsolutions.com/
>Attempting local installation of 'svn_conf_generator'
>Local gem file not found: svn_conf_generator*.gem
>Attempting remote installation of 'svn_conf_generator'
>Updating Gem source index for: http://dist.agilewebsolutions.com/
>ERROR:  While executing gem ... (OpenURI::HTTPError)
>     404 Not Found
>id-ruby:~ arie$
>
>what am i doing wrong??
>

Sorry, I got spaces in the source url. This should work:

gem install --source http://dist.agilewebsolutions.com/
svn_conf_generator-0.0.2.gem svn_conf_generator
Posted by Roustem Karimov (Guest)
on 2006-04-26 06:07
(Received via mailing list)
On Wednesday, April 26, 2006, at 3:52 AM, Roustem Karimov wrote:
>Sorry, I got spaces in the source url. This should work:
>
>gem install --source http://dist.agilewebsolutions.com/
>svn_conf_generator-0.0.2.gem svn_conf_generator

The url is still broken. Please see Wiki for instructions:

http://wiki.rubyonrails.org/rails/pages/SVN+Conf+Generator
Posted by Jim Morris (wolfmanjm)
on 2006-04-26 07:49
(Received via mailing list)
Hmm I get the following error...

> sudo gem install --source\
 http://dist.agilewebsolutions.com/svn_conf_generator-0.0.2.gem 
svn_conf_generator
Attempting local installation of 'svn_conf_generator'
Local gem file not found: svn_conf_generator*.gem
Attempting remote installation of 'svn_conf_generator'
Updating Gem source index for:
http://dist.agilewebsolutions.com/svn_conf_generator-0.0.2.gem
ERROR:  While executing gem ... (NoMethodError)
    undefined method `name' for nil:NilClass
Posted by Arie Kusuma Atmaja (Guest)
on 2006-04-26 07:58
(Received via mailing list)
Jim Morris wrote:
>     undefined method `name' for nil:NilClass
>> http://wiki.rubyonrails.org/rails/pages/SVN+Conf+Generator
yeah.. same here

id-ruby:~ arie$ sudo gem install --source
http://dist.agilewebsolutions.com/svn_conf_generator-0.0.2.gem
svn_conf_generator
Password:
Attempting local installation of 'svn_conf_generator'
Local gem file not found: svn_conf_generator*.gem
Attempting remote installation of 'svn_conf_generator'
ERROR:  While executing gem ... (NoMethodError)
     undefined method `name' for nil:NilClass
id-ruby:~ arie$


--
sig "kind regards" :name => "Arie Kusuma Atmaja", :callme => "Arie",
:yahoo_messenger => "riyari3", :email => "ariekusumaatmaja@gmail.com",
:blog => %Q~ http://ariekusumaatmaja.wordpress.com ~

haree genee pake (as|ph)p ?
siape lu mo bikin framework Ruby test/unit pake php :p
Posted by Roustem Karimov (Guest)
on 2006-04-26 16:32
(Received via mailing list)
On Wednesday, April 26, 2006, at 12:54 PM, Arie Kusuma Atmaja wrote:
>Jim Morris wrote:
>> Hmm I get the following error...
>
>yeah.. same here
>

Thanks a lot for testing this. After Rails, rubygems requires a lot of
configuration. The problem is now fixed. This command should work:

gem install --source http://dist.agilewebsolutions.com 
svn_conf_generator

Roustem
Posted by Feurio (Guest)
on 2006-05-03 20:18
Roustem Karimov wrote:
> On Wednesday, April 26, 2006, at 12:54 PM, Arie Kusuma Atmaja wrote:
>>Jim Morris wrote:
>>> Hmm I get the following error...
>>
>>yeah.. same here
>>
> 
> Thanks a lot for testing this. After Rails, rubygems requires a lot of
> configuration. The problem is now fixed. This command should work:
> 
> gem install --source http://dist.agilewebsolutions.com 
> svn_conf_generator
> 
> Roustem


I had another error:

Attempting local installation of 'svn_conf_generator'
Local gem file not found: svn_conf_generator*.gem
Attempting remote installation of 'svn_conf_generator'
Updating Gem source index for: http://dist.agilewebsolutions.com
ERROR:  While executing gem ... (ArgumentError)
    parse error on line 24, col -1: `'

-------

Later I found out that the generator is available via rubyforge:

gem install svn_conf_generator --remote


And this worked finally for me too.
Posted by Jim Morris (wolfmanjm)
on 2006-05-04 00:47
(Received via mailing list)
I installed from rubygems..

> sudo gem install svn_conf_generator --remote
Attempting remote installation of 'svn_conf_generator'
Updating Gem source index for: http://gems.rubyforge.org
Successfully installed svn_conf_generator-0.0.3

Then on  new project...
> ./script/generate svn_conf

Then I did this...
> rake svn:configure

(in ...)
Setting svn:ignore properties:
svn: 'tmp/cache' is not a working copy
svn: 'tmp/sessions' is not a working copy
svn: 'tmp/sockets' is not a working copy
svn: 'log' is not a working copy
svn: 'config' is not a working copy
svn: 'db' is not a working copy
Done.

> dir -a
.  ..  app  components  config  db  doc  lib  log  public  Rakefile 
README  script
test  tmp  vendor

There seem to be no .cvsignore or .svnignote files anywhere to be found. 
Did I do
something wrong? or does this need to be run after svn import? (Which 
would seem to go
against the whole purpose of the thing).
Posted by Arie Kusuma Atmaja (Guest)
on 2006-05-04 03:56
(Received via mailing list)
Jim Morris wrote:
> Then I did this...
> Done.
> 
>> dir -a
> .  ..  app  components  config  db  doc  lib  log  public  Rakefile  README  script
> test  tmp  vendor
> 
> There seem to be no .cvsignore or .svnignote files anywhere to be found. Did I do
> something wrong? or does this need to be run after svn import? (Which would seem to go
> against the whole purpose of the thing).

seems you haven't checkout your svn project after you imported it ?
it works fine here..


--
Name  : Arie Kusuma Atmaja, A.K.A Arie / YM! = riyari3
Blog  : http://ariekusumaatmaja.wordpress.com
Ruby  : http://groups.yahoo.com/groups/id-ruby
!Ruby : http://indoforums.com/englishklab

haree geneee pake (aa ess | pe ha) pe ??
Posted by Jim Morris (wolfmanjm)
on 2006-05-04 07:26
(Received via mailing list)
I haven't checked it in either :) I thought the purpose of this was to 
create .cvsignore
files, so when you import it, it doesn't checkin files and directories 
that should to be
ignored.

Guess I was wrong.
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.