I would like to know if there is a way to 'package' an application
with all the associated gems and ship it to a new server and having it
to "just work" in a Windows environment.
Although I have never done it I know that Rails can be frozen into the
application. I am wondering if I can do the same thing with other
gems. I have found this (http://gemsonrails.rubyforge.org) that seems
to be what I need, although it's from 2007 and I was wondering if
anybody is using it and/or there are other or better alternatives.
Since I can't use RVM I have looked into Pik but that, I believe, will
not help me since it's a way to keep environments separate, not
'package' the application as I need it.
Also, would it be possible to include Ruby and Mongrel in the
'package'? That would be just great.
I would like to know if there is a way to 'package' an application
with all the associated gems and ship it to a new server and having it
to "just work" in a Windows environment.
Rails doesn't ever "just work" on Windows, does it?
Although I have never done it I know that Rails can be frozen into the
application. I am wondering if I can do the same thing with other
gems. I have found this (http://gemsonrails.rubyforge.org) that seems
to be what I need, although it's from 2007 and I was wondering if
anybody is using it and/or there are other or better alternatives.
Rails 2: rake gems:unpack
Rails 3: Bundler (which you can also install for use with Rails 2 if you
like)
Since I can't use RVM I have looked into Pik but that, I believe, will
not help me since it's a way to keep environments separate, not
'package' the application as I need it.
It might still help you.
Also, would it be possible to include Ruby and Mongrel in the
'package'? That would be just great.
Mongrel is a gem, but it's got compiled bits IIRC.
Any help would be greatly appreciated.
Investigate JRuby and Glassfish. Better yet, don't deploy on Windows.
Rails doesn't ever "just work" on Windows, does it?
> Although I have never done it I know that Rails can be frozen into the
> application. I am wondering if I can do the same thing with other
> gems. I have found this (http://gemsonrails.rubyforge.org) that seems
> to be what I need, although it's from 2007 and I was wondering if
> anybody is using it and/or there are other or better alternatives.
Rails 2: rake gems:unpack
Rails 3: Bundler (which you can also install for use with Rails 2 if you
like)
Will look into that. Thanks.
Mongrel is a gem, but it's got compiled bits IIRC.
Yes, I know it's a gem. I'm guessing I'm wrong but I thought it would
be easier/best if I have it installed "in the open" and use Windows
services if I am running more than one application on the same server.
Can I start a Windows service if I have Mongrel frozen under the
application?
Investigate JRuby and Glassfish.
I looked into JRuby some time ago. What would that buy me in
relationship to 'packaging' the application?
Mongrel is a gem, but it's got compiled bits IIRC.
Yes, I know it's a gem. I'm guessing I'm wrong but I thought it would
be easier/best if I have it installed "in the open" and use Windows
services if I am running more than one application on the same server.
Can I start a Windows service if I have Mongrel frozen under the
application?
I have no idea. I don't use Windows.
Investigate JRuby and Glassfish.
I looked into JRuby some time ago. What would that buy me in
relationship to 'packaging' the application?
Well, you could compile the whole thing as a WAR file and deploy it as a
Java servlet. Glassfish supposedly gets you similar benefits without
needing to compile.
I don't use JRuby for Rails, but I understand it tends to be the easiest
way to get things working on Windows.
Better yet, don't deploy on Windows.
You couldn't resist, could you?
No. Why do things that are painful if a known non-painful way is
available?
> I looked into JRuby some time ago. What would that buy me in
> relationship to 'packaging' the application?
Well, you could compile the whole thing as a WAR file and deploy it as a
Java servlet. Glassfish supposedly gets you similar benefits without
needing to compile.
I don't use JRuby for Rails, but I understand it tends to be the easiest
way to get things working on Windows.
Thanks
>> Better yet, don't deploy on Windows.
> You couldn't resist, could you?
No. Why do things that are painful if a known non-painful way is
available?
Some clients "impose" the infrastructure and that's what we have to
work with. I've been told "We want Oracle because we already have it
and we don't want to have to learn to maintain MySQL/PostgreSQL/
other". They prefer Windows for the same exact reason. Learning Linux
is something they just don't want to do. It's unfortunate but it's
reality.
Some clients "impose" the infrastructure and that's what we have to
work with. I've been told "We want Oracle because we already have it
and we don't want to have to learn to maintain MySQL/PostgreSQL/
other". They prefer Windows for the same exact reason. Learning Linux
is something they just don't want to do. It's unfortunate but it's
reality.
Oh, I'm aware of that. But that doesn't mean we have to support bizarre
technical requirements. I think I'd turn down a client who wanted me to
deploy a Rails application on Windows.
I would like to know if there is a way to 'package' an application
with all the associated gems and ship it to a new server and having it
to "just work" in a Windows environment.
Many will dis it but I have found Instant Rails well suited to exactly that (if you have to work in windows). The latest version of Instant Rails is old and uses Rails 2.0 or so it can be upgraded using gems (look on this list for problems with that other have had) to at least 2.3. I do not know the score on 3.0 as I have not gotten there yet. IR integrates all of the stuff for ROR including Ruby, the db server (mysql) and mongrel (I think, if not you can install it using gem install) You can just freeze all of your gems and away you go.
Many will dis it but I have found Instant Rails well suited to exactly
that (if you have to work in windows). The latest version of Instant
Rails is old and uses Rails 2.0 or so it can be upgraded using gems
(look on this list for problems with that other have had) to at least
2.3. I do not know the score on 3.0 as I have not gotten there yet. IR
integrates all of the stuff for ROR including Ruby, the db server
(mysql) and mongrel (I think, if not you can install it using gem
install) You can just freeze all of your gems and away you go.
I had not thought about IR but it actually would not work in this
case, I think.
To make the whole picture "even better" the client will not only use
Windows but MSSQL as well, which is how the whole mess started
actually (ODBC problems). In order to use MSSQL I have to install some
gems that need the DevKit and DevKit needs Ruby to be installed with
the Rubyinstaller (if I remember the name well). That would probably
not work (I could be wrong) with Ruby installed from IR. Also the
Rails version will probably need to be upgraded to make all our
applications "compatible".
Manually installing Ruby and Mongrel and then freezing gems into the
application might be the way to go here. I'll be trying out Marnen's
suggestions for that and I will also try to replace the ODBC
dependency with something like 'tiny_tds' and see how that works.
To make the whole picture "even better" the client will not only use
Windows but MSSQL as well, which is how the whole mess started
actually (ODBC problems).
Then do what we're doing here: use a separate *nix server for the Rails
app, and connect with TinyTds. That way Rails and MSSQL both get the
environment in which they're happiest.
If you can't do that, JRuby and jTDS might work, or you could use MRI
and ODBC.
Then do what we're doing here: use a separate *nix server for the Rails
app, and connect with TinyTds. That way Rails and MSSQL both get the
environment in which they're happiest.
That's exactly the idea I had in mind but... it was not well received.
Then do what we're doing here: use a separate *nix server for the Rails
app, and connect with TinyTds. That way Rails and MSSQL both get the
environment in which they're happiest.
That's exactly the idea I had in mind but... it was not well received.
Some clients are not worth working for. Keep that in mind.
Many will dis it but I have found Instant Rails well suited to exactly
I had not thought about IR but it actually would not work in this
case, I think.
They "dis" it when people suggest deploying apps with it, because it's
a development platform with no security and poor management ability.
If you *have* to use Rails on Windows, either set it up manually or
use the Bitnami RubyStack.
To make the whole picture "even better" the client will not only use
Windows but MSSQL as well
Excuse my abruptness, but what on Earth are they using Rails for then?
And who is making these (erroneous) technical decisions?
Sounds like an ideal environment for a .Net application.
I'm with Marnen... run away from them :-/
The Glassfish app server 1) is way overkill for a JRuby/Rails app
and 2) doesn't officially support JRuby any more. And the Glassfish
gem is no longer under development.
If you want to use JRuby look at Tomcat or the Trinidad (embedded
Tomcat) gem. (There's also a Jetty-based gem but I haven't used it
and don't know how actively it's being maintained.)