Forum: Nitro Install your own Nitro dev-branch gems!

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.
Bd10252dc68b39171cc9bf5f74bcb9f1?d=identicon&s=25 Arne Brasseur (Guest)
on 2007-12-07 03:53
(Received via mailing list)
The easiest way to try out the latest and greatest, assuming you have
ruby, rubygems, rake and darcs installed.

Get the repo:

  darcs get http://repo.nitroproject.org

Build the gems

  cd repo.nitroproject.org
  rake dist:all

Install them

  cd dist #very important!
  for a in facets english opod blow glue og raw nitro; do sudo gem
install $a;done

Successfully installed facets-2.1.3
Successfully installed english-0.1
Successfully installed opod-0.0.1
Successfully installed blow-0.3.3
Successfully installed glue, version 0.50.0
Successfully installed og, version 0.50.0
Successfully installed raw, version 0.50.0
Successfully installed nitro, version 0.50.0

Try it!

  cd ../nitro/demo/hello
  RUBYOPT=-rubygems nitro

For the blog adapt nitro/demo/blog/conf/debug.rb according to your DB
setup. Hint: Og.setup(:adapter => :sqlite)
In the demo/blog directory:

  RUBYOPT='-rubygems -I../../../part/lib' nitro


(This does assume the attached patch has been committed.)


Have fun!

(ab)
91e1fb8bd265b7629491ab64c42f0906?d=identicon&s=25 Reid Thompson (Guest)
on 2007-12-07 05:53
(Received via mailing list)
Arne Brasseur wrote:
>  rake dist:all
> Successfully installed blow-0.3.3
> For the blog adapt nitro/demo/blog/conf/debug.rb according to your DB
>
> (ab)
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Nitro-general mailing list
> Nitro-general@rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general


for cygwin on windows XP -- the only failure for Hello..

cyberhome: /home/rthompso/src/repo.nitroproject.org/nitro/demo/hello>
$  RUBYOPT=-rubygems nitro
  INFO: Starting Webrick server in debug mode, listening at 0.0.0.0:9000
  INFO: Press Ctrl-C to shutdown; Run with --help for options.
DEBUG: Dispatching /
DEBUG: Compiling 'HelloWorld#index' super-method
DEBUG: Dispatching /favicon.ico
DEBUG: Rendering '/status_500'
DEBUG: Dispatching /status_500
DEBUG: Compiling 'HelloWorld#status_500' super-method
DEBUG: Compiling 'status_500' view sub-method [format: html]
ERROR: Error while handling HelloWorld#index(favicon.ico)
ERROR: wrong number of arguments (1 for 0)
   /usr/lib/ruby/gems/1.8/gems/raw-0.50.0/lib/raw/compiler.rb:65:in
`index'
   /usr/lib/ruby/gems/1.8/gems/raw-0.50.0/lib/raw/compiler.rb:65:in
`send'
   /usr/lib/ruby/gems/1.8/gems/raw-0.50.0/lib/raw/compiler.rb:65:in
`index___super'
   /usr/lib/ruby/gems/1.8/gems/raw-0.50.0/lib/raw/controller/render.rb:92:in
`send'
   /usr/lib/ruby/gems/1.8/gems/raw-0.50.0/lib/raw/controller/render.rb:92:in
`render_action'
   /usr/lib/ruby/gems/1.8/gems/raw-0.50.0/lib/raw/adapter.rb:69:in
`send'
   /usr/lib/ruby/gems/1.8/gems/raw-0.50.0/lib/raw/adapter.rb:69:in
`handle_context'
   /usr/lib/ruby/gems/1.8/gems/raw-0.50.0/lib/raw/adapter/webrick.rb:134:in
`do_GET'
   /usr/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in `__send__'
   /usr/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in `service'
   /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
   /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
   /usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
   /usr/lib/ruby/1.8/webrick/server.rb:162:in `start'
   /usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
   /usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
   /usr/lib/ruby/1.8/webrick/server.rb:92:in `each'
   /usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
   /usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
   /usr/lib/ruby/1.8/webrick/server.rb:82:in `start'
   /usr/lib/ruby/gems/1.8/gems/raw-0.50.0/lib/raw/adapter/webrick.rb:57:in
`start'
   /usr/lib/ruby/gems/1.8/gems/nitro-0.50.0/lib/nitro/application.rb:141:in
`start'
   /usr/lib/ruby/gems/1.8/gems/nitro-0.50.0/lib/nitro/main.rb:77:in
`start'
   app.rb:21
   LOGGED FROM:
/usr/lib/ruby/gems/1.8/gems/raw-0.50.0/lib/raw/controller/render.rb:108:in
`render_action'


----- for the Blog ----

need to add tmail to install list.
uuidtools also,

and it works.

Great -- thanks.

----
I'll try to find time to run this at work on my desktop tomorrow (
Gentoo ).

Thanks again,
reid
5f65ee21e577b094753cd7d854dc39e4?d=identicon&s=25 Matthew B Gardner (Guest)
on 2007-12-07 10:24
(Received via mailing list)
Hello -- I followed the instructions here and got:

Successfully installed facets-2.1.3
Successfully installed english-0.1
Successfully installed opod-0.0.1
Successfully installed blow-0.3.3
ERROR:  While executing gem ... (RuntimeError)
    Error instaling glue:
        glue requires facets = 1.8.54
ERROR:  While executing gem ... (RuntimeError)
    Error instaling og:
        og requires glue = 0.50.0
ERROR:  While executing gem ... (RuntimeError)
    Error instaling raw:
        raw requires glue = 0.50.0
ERROR:  While executing gem ... (RuntimeError)
    Error instaling nitro:
        nitro requires og = 0.50.0

I installed the patch manually, several times, and got this every time.
Is
there something else I need to do?

Thanks for any help,
Matt
Bd10252dc68b39171cc9bf5f74bcb9f1?d=identicon&s=25 Arne Brasseur (Guest)
on 2007-12-07 10:49
(Received via mailing list)
Check glue/glue.gemspec. It probably still contains a line like this:

  s.add_dependency("facets", "= 1.8.54")

The patch should have removed this but perhaps something went wrong. The
patch file is intended for use with darcs, I'm not sure it will work
with GNU patch. The correct way of applying the patch (on a clean repo)
is this:

  cd repo.nitroproject.org
  darcs apply ab_200711207_fix_the_gemspecs.patch

After that rebuild the gems (rake dist:all) and try again.

The problem you're seeing is that glue fails to install because of a
missing dependency (facets 1.8), and since the rest depends on glue they
also fail.

I hope this helps. Let us know if you encounter more obstacles.

(ab)

Matthew B Gardner schreef:
91e1fb8bd265b7629491ab64c42f0906?d=identicon&s=25 Reid Thompson (Guest)
on 2007-12-07 13:34
(Received via mailing list)
On Thu, 2007-12-06 at 23:05 -0500, Reid Thompson wrote:
> >  cd repo.nitroproject.org
> > Successfully installed opod-0.0.1
> >
> > Have fun!
>
> DEBUG: Rendering '/status_500'
> `render_action'
>    /usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
> `render_action'
>
> ----
> I'll try to find time to run this at work on my desktop tomorrow ( Gentoo ).
>
> Thanks again,
> reid
>
> _______________________________________________
> Nitro-general mailing list
> Nitro-general@rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general

gentoo ---

rthompso@raker ~/src/repo.nitroproject.org $ darcs apply
../../ab_200711207_fix_the_gemspecs.patch
Finished applying...
rthompso@raker ~/src/repo.nitroproject.org $ rake dist:all
(in /home/rthompso/src/repo.nitroproject.org)
Please install systemu for better-looking results
Building packages for version 0.50.0
...nitro
...raw
...og
...glue
rthompso@raker ~/src/repo.nitroproject.org $ cd dist
rthompso@raker ~/src/repo.nitroproject.org/dist $ for a in facets
english opod blow glue og raw nitro; do sudo gem install $a;done
Password:
Need to update 19 gems from http://gems.rubyforge.org
...................
complete
Successfully installed facets-2.1.3
Successfully installed english-0.1
Successfully installed opod-0.0.1
Successfully installed blow-0.3.3
Successfully installed glue, version 0.50.0
Installing ri documentation for glue-0.50.0...
Installing RDoc documentation for glue-0.50.0...
Successfully installed og, version 0.50.0
Installing ri documentation for og-0.50.0...
Installing RDoc documentation for og-0.50.0...
Successfully installed raw, version 0.50.0
Installing ri documentation for raw-0.50.0...
Installing RDoc documentation for raw-0.50.0...
Successfully installed nitro, version 0.50.0
Installing ri documentation for nitro-0.50.0...
File not found: vendor
rthompso@raker ~/src/repo.nitroproject.org/dist $ cd ../nitro/demo/hello
rthompso@raker ~/src/repo.nitroproject.org/nitro/demo/hello $
RUBYOPT=-rubygems nitro
bash: /home/rthompso/src/repo.nitroproject.org/nitro/bin/nitro:
Permission denied
rthompso@raker ~/src/repo.nitroproject.org/nitro/demo/hello $ ls -rlt
/home/rthompso/src/repo.nitroproject.org/nitro/bin/nitro
-rw-r--r-- 1 rthompso staff 5220 Dec  5 12:11
/home/rthompso/src/repo.nitroproject.org/nitro/bin/nitro


looks like the repo creates nitro without exec permissions.
fixed that and everything appears to work fine for hello.
everything appears to work fine for blog
5f65ee21e577b094753cd7d854dc39e4?d=identicon&s=25 Matthew B Gardner (Guest)
on 2007-12-07 20:13
(Received via mailing list)
That installed them (had to install RedCloth too though, or else raw
failed).
Like the other user, I had to add exec permissions for nitro as well. I
am
encountering a problem, though -- trying to run the TodoList from the
tutorial:

app.rb:3:in `require': no such file to load -- nitro_and_og (LoadError)
        from app.rb:3

All the packages installed successfully, but maybe there's something
else I
need to do?

Thanks again for your help,
Matt
Bd10252dc68b39171cc9bf5f74bcb9f1?d=identicon&s=25 Arne Brasseur (Guest)
on 2007-12-08 06:24
(Received via mailing list)
Matthew B Gardner schreef:
> That installed them (had to install RedCloth too though, or else raw failed).
> Like the other user, I had to add exec permissions for nitro as well. I am
> encountering a problem, though -- trying to run the TodoList from the
> tutorial:
>
> app.rb:3:in `require': no such file to load -- nitro_and_og (LoadError)
>         from app.rb:3
>
That usage is deprecated, I'll go through the tutorial myself over the
weekend to update it. Just do

require "nitro"
require "og"

(ab)
5f65ee21e577b094753cd7d854dc39e4?d=identicon&s=25 Matthew B Gardner (Guest)
on 2007-12-08 06:43
(Received via mailing list)
I actually tried that too...sorry, I should have included that info.

app.rb:3:in `require': no such file to load -- nitro (LoadError)
        from app.rb:3

I didn't have this problem before I switched to the darcs approach (I
switched
b/c of the FormHelper name error).

Thanks again for any help,
Matt
Bd10252dc68b39171cc9bf5f74bcb9f1?d=identicon&s=25 Arne Brasseur (Guest)
on 2007-12-08 07:35
(Received via mailing list)
Matthew B Gardner schreef:
> I actually tried that too...sorry, I should have included that info.
>
> app.rb:3:in `require': no such file to load -- nitro (LoadError)
>         from app.rb:3
>
> I didn't have this problem before I switched to the darcs approach (I switched
> b/c of the FormHelper name error).
>
>
So are you installing the gems or running the repo the directly? In the
first case add require "rubygems" or use the RUBYOPT=-rubygems trick.

In the second case it's a little more tricky. What I do is add
repo_dir/script to the include path and then require "lib/glycerin"
which should take care of setting the load path correctly for
nitro/raw/og/glue.

So I have a little script called setnitro which looks like this:

export PATH=/home/plexus/work/nitro_repo/nitro/bin:$PATH
export WORK=$HOME/work
export RUBYOPT="-rubygems -I$WORK/nitro_repo/script -rlib/glycerin
-I$WORK/facets_trunk/lib/core -I$WORK/facets_trunk/lib/more
-I/home/plexus/work/blow_svn/trunk/lib -I$WORK/blow_svn/trunk/lib
-I$WORK/english_svn/trunk/lib -I$WORK/opod_svn/trunk/lib"

But if you're using gems apart from nitro/og you can truncate the last
line to

export RUBYOPT="-rubygems -I$WORK/nitro_repo/script -rlib/glycerin"

Then "source" it in your shell by using the dot:

. setnitro

This should change your current environment settings, after that you
should be able to simply launch "nitro" in the same dir as app.rb.

Good luck, keep us posted on how it goes.

(ab)
5f65ee21e577b094753cd7d854dc39e4?d=identicon&s=25 Matthew B Gardner (Guest)
on 2007-12-08 07:56
(Received via mailing list)
I required rubygems (sorry, I thought I had tried that before, but maybe
only
with nitro_and_og), but I still have the FormHelper name error.

./app/controller/root.rb:2: uninitialized constant
RootController::FormHelper
(NameError)
        from
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
        from app.rb:7

Looks like I did all this for nothing :). Do I just need to require a
file to
get around this problem?

Thanks again again,
Matt
Bd10252dc68b39171cc9bf5f74bcb9f1?d=identicon&s=25 Arne Brasseur (Guest)
on 2007-12-08 09:24
(Received via mailing list)
Matthew B Gardner schreef:
> get around this problem?
>
>
module FormHelper is defined in view/nform, so

  require "view/nform"

might do the trick. If you still get the same problem try fully
qualifying it:

  include Raw::FormHelper

Thanks for trying the tutorial and reporting this.

(ab)
5f65ee21e577b094753cd7d854dc39e4?d=identicon&s=25 Matthew B Gardner (Guest)
on 2007-12-08 09:38
(Received via mailing list)
Requiring 'view/nform' didn't work, but I think Raw::FormHelper did. I
had
already tried this and it booted, but I thought it didn't actually
work...I
guess it did...here's the problem:

DEBUG: Compiling 'RootController#index' super-method
DEBUG: SELECT * FROM `ogtodoitem`
DEBUG: Compiling 'index' view sub-method [format: html]

When I go to the index page, it's showing me the generic "You have
successfully installed Nitro!" index. Hopefully the above provides
enough
information, please let me know if it doesn't. This problem wasn't
happening
prior to the darcs install.

Thanks again for any help,
Matt
5f65ee21e577b094753cd7d854dc39e4?d=identicon&s=25 Matthew B Gardner (Guest)
on 2007-12-09 06:52
(Received via mailing list)
nitro --create todolist isn't working after the darcs install either.

-Matt
Bd10252dc68b39171cc9bf5f74bcb9f1?d=identicon&s=25 Arne Brasseur (Guest)
on 2007-12-09 07:53
(Received via mailing list)
IIRC it's "nitro create todolist" now, without the dashes.

(ab)

Matthew B Gardner schreef:
45196398e9685000d195ec626d477f0e?d=identicon&s=25 Trans (Guest)
on 2007-12-09 07:56
(Received via mailing list)
On Dec 9, 12:50 am, Matthew B Gardner <weat...@speakeasy.net> wrote:
> nitro --create todolist isn't working after the darcs install either.

That's my fault. Will have to fix... hmmm... did you try:

  nitro create todolist

that's what is should in any case, since it's a subcommand, not an
option.

T.
5f65ee21e577b094753cd7d854dc39e4?d=identicon&s=25 Matthew B Gardner (Guest)
on 2007-12-09 07:57
(Received via mailing list)
Yep, just saw Arne's email and that worked.

Thanks to both,
Matt
5f65ee21e577b094753cd7d854dc39e4?d=identicon&s=25 Matthew B Gardner (Guest)
on 2007-12-09 08:16
(Received via mailing list)
Just to update, I reinstalled darcs, rewrote the todolist example from
the
tutorial, and it's working. Switching to the tutorial todolist1, I still
get
the generic index page. Please let me know if any further information is
needed to help correct the problem.

Thanks again for all the help...it's nice to see it working!
-Matt
Bd10252dc68b39171cc9bf5f74bcb9f1?d=identicon&s=25 Arne Brasseur (Guest)
on 2007-12-09 08:58
(Received via mailing list)
Matthew B Gardner schreef:
> Just to update, I reinstalled darcs, rewrote the todolist example from the
> tutorial, and it's working. Switching to the tutorial todolist1, I still get
> the generic index page. Please let me know if any further information is
> needed to help correct the problem.
>
>
I'm guessing this could have something to do with the 'x' suffix to
template files. I'll post an upgdated tutorial later on.

(ab)
91e1fb8bd265b7629491ab64c42f0906?d=identicon&s=25 Reid Thompson (Guest)
on 2007-12-14 19:36
(Received via mailing list)
On Fri, 2007-12-07 at 10:50 +0800, Arne Brasseur wrote:

should nitro be a requirement for og?

rthompso@raker /usr/lib/ruby/gems/1.8/gems $ irb
irb(main):001:0> require 'og'
NameError: uninitialized constant Og
  from /usr/lib/ruby/gems/1.8/gems/og-0.50.0/lib/og/validation.rb:4
  from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
  from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
  from /usr/lib/ruby/gems/1.8/gems/og-0.50.0/lib/og/main.rb:14
  from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
  from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
  from /usr/lib/ruby/gems/1.8/gems/og-0.50.0/lib/og.rb:1
  from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in
`gem_original_require'
  from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in
`require'
  from (irb):1
irb(main):002:0> require 'nitro'
=> true
irb(main):003:0> require 'og'
=> true
irb(main):004:0>
This topic is locked and can not be replied to.