Forum: Ruby on Rails Getting RJS / EgdeRails working

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.
9c4e6c266d78fa29399fca27d5c7b7ba?d=identicon&s=25 Jan Deppisch (Guest)
on 2006-03-04 18:33
(Received via mailing list)
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
30269682335f1fb247d71969fa715b5e?d=identicon&s=25 Roberto Saccon (rsaccon)
on 2006-03-04 19:03
(Received via mailing list)
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.
2ccb2f7699267d258faaafce4ee997df?d=identicon&s=25 Cody Fauser (Guest)
on 2006-03-04 22:35
(Received via mailing list)
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 Deppisch <mail@netzartist.de> wrote:
> thx
> Jan
>
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
Cody Fauser
http://www.codyfauser.com
9a46755c817121b0571a563e5ab02090?d=identicon&s=25 Brian Buckley (brian)
on 2006-03-05 01:19
(Received via mailing list)
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:in `silence_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:in
`re
quire__'
        from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in
`re
quire'
        from script/server:3
2ccb2f7699267d258faaafce4ee997df?d=identicon&s=25 Cody Fauser (Guest)
on 2006-03-05 02:35
(Received via mailing list)
What version of Rails were you running before this?

On 3/4/06, Brian Buckley <briankbuckley@gmail.com> wrote:
> nel/agnostics.rb:7:in ``': Exec format error - rake tmp:create
>         from
> `re
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
>
>


--
Cody Fauser
http://www.codyfauser.com
2ccb2f7699267d258faaafce4ee997df?d=identicon&s=25 Cody Fauser (Guest)
on 2006-03-05 02:38
(Received via mailing list)
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 Fauser <codyfauser@gmail.com> wrote:
> > >ruby script/server
> >         from
> > 28
> >
> Cody Fauser
> http://www.codyfauser.com
>


--
Cody Fauser
http://www.codyfauser.com
9c4e6c266d78fa29399fca27d5c7b7ba?d=identicon&s=25 Jan Deppisch (Guest)
on 2006-03-05 02:53
(Received via mailing list)
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 Fauser:
> 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 Fauser
>> http://www.codyfauser.com
>>
9a46755c817121b0571a563e5ab02090?d=identicon&s=25 Brian Buckley (brian)
on 2006-03-05 17:18
(Received via mailing list)
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.
9c4e6c266d78fa29399fca27d5c7b7ba?d=identicon&s=25 Jan Deppisch (Guest)
on 2006-03-05 18:40
(Received via mailing list)
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 Buckley:
> 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
>> Rails@lists.rubyonrails.org
>> http://lists.rubyonrails.org/mailman/listinfo/rails
>>
2ccb2f7699267d258faaafce4ee997df?d=identicon&s=25 Cody Fauser (Guest)
on 2006-03-05 18:55
(Received via mailing list)
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 Buckley <briankbuckley@gmail.com> wrote:
> your project in the first place?
> > > Brian
> > > /core_ext/kernel/agnostics.rb:7:in ``'
> ./script/../config/../vendor/rails/activesupport/lib/active_support
> > >
> > >
> > Cody Fauser
> Rails@lists.rubyonrails.org
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
>
>


--
Cody Fauser
http://www.codyfauser.com
9c4e6c266d78fa29399fca27d5c7b7ba?d=identicon&s=25 Jan Deppisch (Guest)
on 2006-03-05 20:48
(Received via mailing list)
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 Fauser:
> 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.
5ce55767684e0cd1727db2b8b8975640?d=identicon&s=25 Steve Longdo (Guest)
on 2006-03-05 22:38
(Received via mailing list)
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
9c4e6c266d78fa29399fca27d5c7b7ba?d=identicon&s=25 Jan Deppisch (Guest)
on 2006-03-05 22:56
(Received via mailing list)
It shows "rake update_javascripts". What should I do ?

Am 05.03.2006 um 22:36 Uhr schrieb Steve Longdo:
> 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
2ccb2f7699267d258faaafce4ee997df?d=identicon&s=25 Cody Fauser (Guest)
on 2006-03-05 23:02
(Received via mailing list)
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 Deppisch <mail@netzartist.de> wrote:
> Now the WEBrick starts fine, but my test-rjs-file doesnt get recognized.
> Am 05.03.2006 um 18:54 Uhr schrieb Cody Fauser:
> >>
> >> > > 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
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
Cody Fauser
http://www.codyfauser.com
Cf80d0758047e94940444feadf82a9bf?d=identicon&s=25 frazer horn (Guest)
on 2006-03-05 23:20
(Received via mailing list)
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
Fb7947fdf96a2811ea79d7aef3cbf260?d=identicon&s=25 unknown (Guest)
on 2006-03-05 23:23
(Received via mailing list)
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
Ac1da5d66d51a1c3b843221032247b30?d=identicon&s=25 Eric Goodwin (Guest)
on 2006-03-05 23:26
(Received via mailing list)
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 Goodwin
9a46755c817121b0571a563e5ab02090?d=identicon&s=25 Brian Buckley (brian)
on 2006-03-06 02:00
(Received via mailing list)
Just an FYI -- seeing your post I upgraded from 1.8.2 to 1.8.4.  Sigh.
Same
error remains for me.
9c4e6c266d78fa29399fca27d5c7b7ba?d=identicon&s=25 Jan Deppisch (Guest)
on 2006-03-06 02:09
(Received via mailing list)
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! :) 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 Buckley:
> 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/stab...
>> > > According to your example I have an add-method, a add-view showing the
>> > > Am 05.03.2006 um 18:54 Uhr schrieb Cody Fauser:
>> > > >> 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
>>
>>
2ccb2f7699267d258faaafce4ee997df?d=identicon&s=25 Cody Fauser (Guest)
on 2006-03-06 03:40
(Received via mailing list)
Jan,

Did you include the javascripts in your layout?

<%= javascript_include_tag :defaults %>

On 3/5/06, Jan Deppisch <mail@netzartist.de> wrote:
> views/jstest/add.rhtml
>
> >>
> >> >
> >> > haven't looked.
> >> > > EdgeRails-trials (in vendor/rails) into my javascripts-dir, so I had
> >> > > thought that this could become such a tragedy on windows (<- could
> >> > >
> >> > > >>
> >> > > >> > On 3/4/06, Brian Buckley < briankbuckley@gmail.com> wrote:
> >> > > >> > >
> >> > > >> > >         from
> >> > > >> > >
> >> > > >>
> >> > > >>
> >> >
> >>
> > Brian K. Buckley
> > briankbuckley@gmail.com
>
>
>
>
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
Cody Fauser
http://www.codyfauser.com
Cf80d0758047e94940444feadf82a9bf?d=identicon&s=25 frazer horn (Guest)
on 2006-03-06 05:10
(Received via 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
A7db9ec803b5895ae5f916a74e2db329?d=identicon&s=25 HH (Guest)
on 2006-03-06 09:30
(Received via mailing list)
Can¹t you just copy the files manually and be on your way? Seems like a
lot
of time to spend on an issue that will go away when Rails 1.1 goes
final.



From: Brian Buckley <briankbuckley@gmail.com>
Reply-To: <rails@lists.rubyonrails.org>
Date: Sun, 5 Mar 2006 21:27:59 -0330
To: <rails@lists.rubyonrails.org>
Subject: Re: [Rails] Getting RJS / EgdeRails working

Just an FYI -- seeing your post I upgraded from 1.8.2 to 1.8.4.  Sigh.
Same
error remains for me.
9c4e6c266d78fa29399fca27d5c7b7ba?d=identicon&s=25 Jan Deppisch (Guest)
on 2006-03-06 10:42
(Received via mailing list)
Sure.

When about will Rails 1.1 be released ? I think I stop trying to get it
running now and wait for 1.1...

Am 06.03.2006 um 03:37 Uhr schrieb Cody Fauser:
> Jan,

> Did you include the javascripts in your layout?

> <%= javascript_include_tag :defaults %>

>>
>> Jan
>> >> you describe.
>> >> > Jan,
>> >> > problem on Windows.  I don't personally develop on Windows, so I
>> >> > > Prototype was on 1.4.x. So I copied the newer js from my former
>> >> > > I guess something went wrong earlier, but I haven't any idea... Newer
>> >> > > > with the -r flag to svn.
>> >> > > >> would give the error Jan and I are now seeing.
>> >> > > >> >
>> >> > > >> > > => Booting WEBrick...
>> >>
>> >> > > >>
>> >> > > >> > >
>> >> > > >> > >         from
>> >> > > >> > > quire'
>> >> > Cody Fauser
>> >> Rails@lists.rubyonrails.org
>>
>>
>>
>> _______________________________________________
>> Rails mailing list
>> Rails@lists.rubyonrails.org
>> http://lists.rubyonrails.org/mailman/listinfo/rails
>>
5ce55767684e0cd1727db2b8b8975640?d=identicon&s=25 Steve Longdo (Guest)
on 2006-03-06 11:01
(Received via mailing list)
What steps would a person need to take to build the rails/Action* gems
from
an svn co?  gem build?  ruby release.rb?  Would there be some
configuration
possible to say build the rails gems from the latest SVN co and put the
reults into my local gem repo?

I remember DHH used to keep beta gems hosted on his site in the run up
to
0.14.0, perhaps if individuals could do that after checking out the
source?
A new rake rails:build:local:gems task would be cool... and these type
of
email threads would get shorter and shorter...  :-)

-Steve
http://www.stevelongdo.com
4b9ddc0a8f597b5145d676a205b1a615?d=identicon&s=25 Giovanni Intini (Guest)
on 2006-03-06 18:46
(Received via mailing list)
2006/3/6, Jan Deppisch <mail@netzartist.de>:

> views/jstest/add.rhtml
> views/jstest/add.rjs
>

I'm probably wrong, but are you allowed to have both add.rjs and .rhtml?
I
thought you couldn't.
5d15c6821f3c3054c04b85471824ba7c?d=identicon&s=25 Kevin Olbrich (Guest)
on 2006-03-06 19:07
(Received via mailing list)
I would also make sure you are using the most most up to date version of
rake.
I seem to recall a new one came out a month or so ago.

gem update rake

_Kevin
5374b14d364988d824b3f7f5c3c6625d?d=identicon&s=25 olivier Hericord (Guest)
on 2006-03-07 22:00
(Received via mailing list)
i'm also very interrested by this topic....any tutorial on how to
design the database to support that?
5374b14d364988d824b3f7f5c3c6625d?d=identicon&s=25 olivier Hericord (Guest)
on 2006-03-07 22:12
(Received via mailing list)
by the way .... filling the database with 1000 items is not always
bad....they are built for that no?
and that allows to find things instantly with a single query.
when recurring events are just defined by a rule it's longer to
manipulate them....no?
B72ddec708814c39b2aa3e7ca7e54b67?d=identicon&s=25 Alex Zhukov (Guest)
on 2006-03-07 22:21
(Received via mailing list)
The simplest solution is - make the recurring event reschedule itself.

example:
	database table looks like this:
	table event:
		name
		datetime
		recurrting - true/false
		frequecy - 1hr

	event1 - scheduled to run every hour
	the the event runs for example at 15pm and after it is done it
reschedules
	itself to run again at 16pm.

With this kind of setup the reccurring event takes one row in the
database, and you can easily
cancel or change it.


--
best regards,
Alex Zhukov
baron.pampa@gmail.com
D4b246038154d7cc2363256bd25a4fe0?d=identicon&s=25 Larry White (Guest)
on 2006-03-07 22:33
(Received via mailing list)
another option is to instantiate new events lazily (if that's a word).
Whenever you look at the calendar for a day, you instantiate the dates
for
that day.  This has the advantage of letting you look ahead, whereas the
recurring approach, while much simpler, will show the calendar as empty
in
the future.

Since this is probably very expensive, you might want to have a window
of
time where you scheduled ahead, and only go beyond that as needed.  You
may
also want to index your repetitive event rules by day of week and day of
month so that you know which ones you need to look at.
This topic is locked and can not be replied to.