Forum: Ruby on Rails easiest way to play w/ source

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
benanderson.us (Guest)
on 2005-11-23 23:17
(Received via mailing list)
Hi,
So, I'm looking into possibly adding the functionality I mentioned in
my last note.  What's the easiest way for me to play with the source?
I've got the svn repo checked out.  Can I just have webbrick somehow
point to the svn directory that I'm modifying instead of the installed
gem?  I'm pretty new to ruby, so I'm not too familiar with the way the
ruby path works.  Coming from the java world, I'm hoping I can just
put my svn directory before the gems directory on the classpath?

Any developers lend a tip here?
Thanks,
Ben
jeremy (Guest)
on 2005-11-23 23:21
(Received via mailing list)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Nov 23, 2005, at 1:16 PM, Ben A. wrote:
> Hi,
> So, I'm looking into possibly adding the functionality I mentioned in
> my last note.  What's the easiest way for me to play with the source?
> I've got the svn repo checked out.  Can I just have webbrick somehow
> point to the svn directory that I'm modifying instead of the installed
> gem?  I'm pretty new to ruby, so I'm not too familiar with the way the
> ruby path works.  Coming from the java world, I'm hoping I can just
> put my svn directory before the gems directory on the classpath?

$ cd /path/to/my/app
$ rake freeze_edge

This checks out svn trunk to your vendor/rails dir.
If you have a vendor/rails dir, it's used instead of the gems.

jeremy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (Darwin)

iD8DBQFDhN1YAQHALep9HFYRAkxTAJ9kL3WGU0Z24OSV4S1jvINrHySZVwCfWo1s
6379E7dH8nL5hs5SDaFbsy4=
=fvmr
-----END PGP SIGNATURE-----
benanderson.us (Guest)
on 2005-11-24 00:06
(Received via mailing list)
cool, thanks jeremy.  I did that and now I'm getting this when starting
webbrick


Processing Base#index (for 127.0.0.1 at 2005-11-23 17:00:13) [GET]
  Parameters: {}


TypeError (cannot convert nil into String):
    /vendor/rails/activesupport/lib/active_support/dependencies.rb:228:in
`load'
    /vendor/rails/activesupport/lib/active_support/dependencies.rb:228:in
`load'
    /vendor/rails/activesupport/lib/active_support/dependencies.rb:52:in
`require_or_load'
    /vendor/rails/activesupport/lib/active_support/dependencies.rb:52:in
`enable_warnings'
    /vendor/rails/activesupport/lib/active_support/dependencies.rb:52:in
`require_or_load'
    /vendor/rails/activesupport/lib/active_support/dependencies.rb:28:in
`depend_on'
    /vendor/rails/activesupport/lib/active_support/dependencies.rb:199:in
`require_dependency'
    /vendor/rails/activesupport/lib/active_support/dependencies.rb:199:in
`require_dependency'
    /vendor/rails/activesupport/lib/active_support/dependencies.rb:155:in
`load_file!'
    /vendor/rails/activesupport/lib/active_support/dependencies.rb:118:in
`const_load!'
    /vendor/rails/activesupport/lib/active_support/dependencies.rb:101:in
`each'
    /vendor/rails/activesupport/lib/active_support/dependencies.rb:101:in
`const_load!'
    /vendor/rails/railties/lib/dispatcher.rb:71:in `prepare_application'
    /vendor/rails/railties/lib/dispatcher.rb:37:in `dispatch'
    /vendor/rails/railties/lib/webrick_server.rb:117:in
`handle_dispatch'
    /vendor/rails/railties/lib/webrick_server.rb:83:in `service'
    c:/ruby/ruby-1.8.2-15/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in
`service'
    c:/ruby/ruby-1.8.2-15/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in
`run'
    c:/ruby/ruby-1.8.2-15/ruby/lib/ruby/1.8/webrick/server.rb:155:in
`start_thread'
    c:/ruby/ruby-1.8.2-15/ruby/lib/ruby/1.8/webrick/server.rb:144:in
`start'
    c:/ruby/ruby-1.8.2-15/ruby/lib/ruby/1.8/webrick/server.rb:144:in
`start_thread'
    c:/ruby/ruby-1.8.2-15/ruby/lib/ruby/1.8/webrick/server.rb:94:in
`start'
    c:/ruby/ruby-1.8.2-15/ruby/lib/ruby/1.8/webrick/server.rb:89:in
`each'
    c:/ruby/ruby-1.8.2-15/ruby/lib/ruby/1.8/webrick/server.rb:89:in
`start'
    c:/ruby/ruby-1.8.2-15/ruby/lib/ruby/1.8/webrick/server.rb:79:in
`start'
    c:/ruby/ruby-1.8.2-15/ruby/lib/ruby/1.8/webrick/server.rb:79:in
`start'
    /vendor/rails/railties/lib/webrick_server.rb:69:in `dispatch'
    /vendor/rails/railties/lib/commands/servers/webrick.rb:59
    c:/ruby/ruby-1.8.2-15/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in
`require__'
    c:/ruby/ruby-1.8.2-15/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in
`require'
    /vendor/rails/activesupport/lib/active_support/dependencies.rb:235:in
`require'
    /vendor/rails/railties/lib/commands/server.rb:28
    c:/ruby/ruby-1.8.2-15/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in
`require__'
    c:/ruby/ruby-1.8.2-15/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in
`require'
    script/server:3


Rendering
./script/../config/../vendor/rails/actionpack/lib/action_controller/templates/rescues/layout.rhtml
(500 Internal Error)

Any ideas?
Thanks,
Ben
jeremy (Guest)
on 2005-11-24 00:34
(Received via mailing list)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Nov 23, 2005, at 2:03 PM, Ben A. wrote:
> cool, thanks jeremy.  I did that and now I'm getting this when
> starting webbrick

That's a bug :)

$ cd vendor/rails
$ svn up

And it should be fixed.

jeremy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (Darwin)

iD8DBQFDhO3SAQHALep9HFYRAtI5AKDUMA62M/HLUZqrddXIeKBkf7n48wCePCno
xqJw1YJVAAEC18ZcYKXSfxg=
=oP9Q
-----END PGP SIGNATURE-----
benanderson.us (Guest)
on 2005-11-24 15:49
(Received via mailing list)
Thanks Jeremy.  svn up doesn't work because they are no .svn
directories.  I did run "rake freeze_edge" again and now rails runs
ok.  I decided to whack that directory and just check out the svn
trunk in vendor/rails instead of using "rake freeze_edge".  This lets
me do updates.  It looks like the only difference is that "rake
freeze_edge" only includes the lib directories.  Are there any gotchas
doing it this way?  Anyways I'm modifying the source and its working
good.

Also, I noticed I have to restart webbrick everytime I make changes to
rails.  Is there a way to get around this?

Also, is this the right list to ask development questions?  Is there a
better place to ask these kinds of questions?

Thanks,
Ben
james.adam (Guest)
on 2005-11-24 16:46
(Received via mailing list)
On 11/24/05, Ben A. <removed_email_address@domain.invalid> wrote:
> Also, I noticed I have to restart webbrick everytime I make changes to
> rails.  Is there a way to get around this?

Unfortunately not... but if you were running your application as CGI
under some other webserver (with rails in /vendor/rails) then you
could - at the expense of tolerable speed.

- james
jeremy (Guest)
on 2005-11-24 22:00
(Received via mailing list)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Nov 24, 2005, at 5:47 AM, Ben A. wrote:
> Thanks Jeremy.  svn up doesn't work because they are no .svn
> directories.  I did run "rake freeze_edge" again and now rails runs
> ok.  I decided to whack that directory and just check out the svn
> trunk in vendor/rails instead of using "rake freeze_edge".  This lets
> me do updates.  It looks like the only difference is that "rake
> freeze_edge" only includes the lib directories.  Are there any gotchas
> doing it this way?  Anyways I'm modifying the source and its working
> good.

I'd just go with the svn checkout.  It's annoying to have to run
the rake task.  Sorry for the misinformation.


> Also, I noticed I have to restart webbrick everytime I make changes to
> rails.  Is there a way to get around this?

No.  The reloading behavior is meant to be fast and convenient for
application developers; Rails hackers can manage on their own :)


> Also, is this the right list to ask development questions?  Is there a
> better place to ask these kinds of questions?

The rails-core list is meant for discussion of Rails development,
but it's just as welcome here.

jeremy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (Darwin)

iD8DBQFDhhs/AQHALep9HFYRAsUVAJ44X7IicXA+vo8CnSRFuE+vBEJfGQCgpKis
X6/+uYrPaqvM4d90rOO+ZqY=
=e6LW
-----END PGP SIGNATURE-----
This topic is locked and can not be replied to.