Getting RJS / EgdeRails working

Hi,

using Rails 1.0 on windows (without svn yet) I just wrote “rake
freeze_edge”. Are the RJS-templates already included then ? When I write
“rake update_javascripts” I receive this error:

svn: ‘.’ is not a working copy

Any tipps for a newbie on how to get the update done (if neccessary) ?

thx
Jan

AFAIK, when you do freeze edge, it just copies the ruby libraries into
vendor/rails. Maybe the easiest is to checkout the the whole rails-edge
from
trunk to a temporary location and then just copy the new Javascripts
manually to your app.

Jan,

rake update_javascripts doesn’t actually do anything when you’ve done
rake freeze_edge because it doesn’t checkout the folders that the rake
task copies the javascripts from. Do the following from your
project’s root directory:

Delete the folder vendor/rails and then

svn co http://dev.rubyonrails.org/svn/rails/trunk vendor/rails
rake update_javascripts
rake add_new_scripts

Open public/javascripts/prototype.js and ensure that the version is
1.5.0_pre0

The you can just cd to your vendor/rails folder and run ‘svn up’
whenever you want to get the latest Rails code.

On 3/4/06, Jan D. [email protected] wrote:

thx
Jan


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


Cody F.
http://www.codyfauser.com

Thank you for providing those instructions. After following them I am
getting an error, stack trace below.

Any suggestions?

Brian

ruby script/server
=> Booting WEBrick…
./script/…/config/…/vendor/rails/activesupport/lib/active_support/core_ext/ker
nel/agnostics.rb:7:in ': Exec format error - rake tmp:create (Errno::ENOEXEC) from ./script/../config/../vendor/rails/activesupport/lib/active_support /core_ext/kernel/agnostics.rb:7:in
from
./script/…/config/…/vendor/rails/railties/lib/commands/server.rb:
28
from
./script/…/config/…/vendor/rails/railties/lib/commands/server.rb:
28:in silence_stderr' from ./script/../config/../vendor/rails/activesupport/lib/active_support /core_ext/kernel/reporting.rb:26:insilence_stream’
from
./script/…/config/…/vendor/rails/activesupport/lib/active_support
/core_ext/kernel/reporting.rb:26:in silence_stderr' from ./script/../config/../vendor/rails/railties/lib/commands/server.rb: 28 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:inre
quire__’
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in
`re
quire’
from script/server:3

What version of Rails were you running before this?

On 3/4/06, Brian B. [email protected] wrote:

nel/agnostics.rb:7:in ``': Exec format error - rake tmp:create
from
`re
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


Cody F.
http://www.codyfauser.com

What I meant to say was - what version of Rails did you use to create
your project in the first place?

On 3/4/06, Cody F. [email protected] wrote:

ruby script/server
from
28

Cody F.
http://www.codyfauser.com


Cody F.
http://www.codyfauser.com

My version/sequence: I had actually already successfully converted to
Edge
from 1.0 a few days back (w/o svn) and wasn’t sure how to update that up
to
the latest. Seeing your instructions I did just the “svn up” command (I
think I ran the two rake commands too). After doing that starting
WEBrink
would give the error Jan and I are now seeing.

Thats exactly how I ran into this error. I also removed vendor/rails,
did the commands again and updated to rev3772, but the error is still
there.

Am 05.03.2006 um 17:17 Uhr schrieb Brian B.:

My version/sequence: I had actually already successfully converted to Edge
from 1.0 a few days back (w/o svn) and wasn’t sure how to update that up to
the latest. Seeing your instructions I did just the “svn up” command (I
think I ran the two rake commands too). After doing that starting WEBrink
would give the error Jan and I are now seeing.

getting an error, stack trace below.
(Errno::ENOEXEC)
./script/…/config/…/vendor/rails/railties/lib/commands/server.rb:

    from script/server:3

Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

First of all, thanks for your help! After rebooting WEBrick I’ve
discovered the same error as Brian. I used Rails 1.0 to create my
project before I went to the RJS idea.

Am 05.03.2006 um 02:35 Uhr schrieb Cody F.:

What I meant to say was - what version of Rails did you use to create
your project in the first place?

./script/…/config/…/vendor/rails/railties/lib/commands/server.rb:
from
from script/server:3


Cody F.
http://www.codyfauser.com

I created a sample project on Linux and Windows and it looks like a
problem only on Windows. Maybe try checking out a bit older revision
with the -r flag to svn.

On 3/5/06, Brian B. [email protected] wrote:

your project in the first place?

Brian
/core_ext/kernel/agnostics.rb:7:in ``’
./script/…/config/…/vendor/rails/activesupport/lib/active_support

Cody F.
[email protected]
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


Cody F.
http://www.codyfauser.com

When you do rake -T from the directory your rails app is in does it show
the
old style “rake update_javascripts” or the newer “rake
rails:update:javascripts” ?

-Steve
http://www.stevelongdo.com

It shows “rake update_javascripts”. What should I do ?

Am 05.03.2006 um 22:36 Uhr schrieb Steve L.:

When you do rake -T from the directory your rails app is in does it show the
old style “rake update_javascripts” or the newer “rake
rails:update:javascripts” ?

-Steve
http://www.stevelongdo.com

Jan,

I just checked out the stable branch and it looks like it is just
version 1.0, so that won’t work. Maybe just try checking out from the
trunk, but try version 3770 or something like that.
svn co -r 3770 http://dev.rubyonrails.org/svn/rails/trunk

Or even start at 3770 and step up until WEBrick dies and file a bug
report.

Maybe there is another thread going that has more details about this
problem on Windows. I don’t personally develop on Windows, so I
haven’t looked.

On 3/5/06, Jan D. [email protected] wrote:

Now the WEBrick starts fine, but my test-rjs-file doesnt get recognized.
Am 05.03.2006 um 18:54 Uhr schrieb Cody F.:

Thank you for providing those instructions. After following them I am
nel/agnostics.rb:7:in ``': Exec format error - rake tmp:create

    from

c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in

`re
quire’
from script/server:3


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


Cody F.
http://www.codyfauser.com

I upgraded to the lates edge today. I also had the same webrick issues
you
describe.

I was running ruby 1.8.2. Upgrading to 1.8.4 solved these issues.

This may help

Frazer

Now I’ve tried the following:

svn co http://dev.rubyonrails.org/svn/rails/branches/stable vendor/rails

This gave me rev3775. Then: svn up → going to rev3776
I did “rake update_javascripts” and “rake add_new_scripts”, but
Prototype was on 1.4.x. So I copied the newer js from my former
EdgeRails-trials (in vendor/rails) into my javascripts-dir, so I had
Prototype 1.5.0_pre0.

Now the WEBrick starts fine, but my test-rjs-file doesnt get recognized.

According to your example I have an add-method, a add-view showing the
UL and add.rjs, but nothing happens onclick (WEBrick reports no error).

I guess something went wrong earlier, but I haven’t any idea… Newer
thought that this could become such a tragedy on windows (<- could this
be the only reason?).

Jan

Am 05.03.2006 um 18:54 Uhr schrieb Cody F.:

I created a sample project on Linux and Windows and it looks like a
problem only on Windows. Maybe try checking out a bit older revision
with the -r flag to svn.

Hi Ryan,
I’ve haven’t actually used it yet, but you should check out Runt.
http://runt.rubyforge.org/
It’s looks to be exactly what you are looking for.
Cheers,
Eric G.

All,

I’m working on a simple scheduling app that needs to support recurring
events. I really don’t want to fill my db tables with 1,000’s of events
each time a user selects a particular event as recurring. Has anyone
out
here tackled this problem? If so could you offer some insights?

Thanks in advance,

–Ryan

Just an FYI – seeing your post I upgraded from 1.8.2 to 1.8.4. Sigh.
Same
error remains for me.

Haha, its getting funny I think…

I’ve installed Ruby 1.8.4. and checked-out Rails to latest rev3784
(lying in my vendor/rails-folder) and having my scripts updated (PT
1.5.0_pre0). WEBrick works fine which is one step further than before,
YES! :slight_smile: But my RJS is still unrecognized somehow.

Cody, maybe I’ve done sth. wrong with the file-structure, but I guess
not:

views/jstest/add.rhtml
views/jstest/add.rjs
and
controllers/jstest_controller.rb

Nothing else matters… (no bad message in the errorlog)

Any idea ?

thanks!!
Jan

Am 06.03.2006 um 01:57 Uhr schrieb Brian B.:

Just an FYI – seeing your post I upgraded from 1.8.2 to 1.8.4. Sigh. Same
error remains for me.

Or even start at 3770 and step up until WEBrick dies and file a bug
http://dev.rubyonrails.org/svn/rails/branches/stablevendor/rails

According to your example I have an add-method, a add-view showing the
Am 05.03.2006 um 18:54 Uhr schrieb Cody F.:

the latest. Seeing your instructions I did just the “svn up”
your project in the first place?

    from

c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in


Rails mailing list

Just a quick note on the windows webrick issues on edge, I noted the
following

vendor\rails\railties\lib\commands\server.rb

comment line (28) out as below

#silence_stderr { rake tmp:create }

You can run rake tmp:create manually if needed.

Then webrick will run fine. I have not followed through any further as
to
why this is an issue.

Hope this helps

Frazer