WHy is rails so annoying to deploy?

I’ve been having great fun trying to deploy a fresh install of rails on
debian, specifically xlsuite to test it out, but my god how many more
errors can I take before I give up.

RAILS IS NOT NICE

After battling with countless different errors from trying Ubuntu,
Fedora, Windows and now Debian the list goes on and on and ON…

now the latest error

`load_missing_constant’: uninitialized constant
ActionController::AbstractRequest (NameError)

is now coming up due to some missing code in the latest rails 2.3.3, so
now I have to hack the application to try to get it to work, but surely
isnt there a simple way to move between rails versions without having to
refactor an entire application (xlsuite) to even get it to work?

I;ve encountered 100’s of glitches between os, ruby and rails versions,
simply none of it works and its totally annoying as NO ONE seems to have
a clue and forums are just a nice place to get lost and go round in
circles…

What can I do — simple answer please…

fresh install of xlsuite and dozens of gems,
fresh install of debian - not the best choice I know for rails

gem update --system doesnt work, nor does the gem install rails, NOTHING
WORKS!!!

List your current Ruby and Rails versions (i.e. the versions you are
upgrading from).

Check to ensure that you have all your gems configured properly and
perform a rake gems install to see if they are all installed properly.
Keep in mind that in production you are using RAILS_ENV=production rake

Start with the simplest things first.

What are you using with Rails, mongrel or passenger?

There are a lot of ways to handle this - I’d start with the patient one.

This kind of attitude and message will only make you be ignored. Try
to be supportive and explain correctly your issues instead of bashing
the framework, 'cos the error usually lies in your code.

This specific error means that your code is meant for a previous
version of rails, probably 2.2 and you can either change it to point
to ActionController::Request or use an old Rails version.

Maurício Linhares
http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr

On Mon, Aug 24, 2009 at 10:26 PM, Arthur

On Aug 24, 9:26 pm, Arthur R. [email protected]
wrote:

a clue and forums are just a nice place to get lost and go round in
Posted viahttp://www.ruby-forum.com/.
I’ve had bad luck with Debian’s Ruby packages. First thing I do when I
build a new ubuntu server is pull down a fresh copy of the ruby source
from ruby-lang.org and compile it. Then I install rubygems and rails.

It seems to me that you’re having more issues just trying to get up
and running with Rails than you are deploying applications, which is
an entirely different monster all together.

Here’s a method of installing rails that I know from experience works
on debian/ubuntu:
http://blog.fiveruns.com/2008/3/3/compiling-ruby-rubygems-and-rails-on-ubuntu

I’d get rid of all of the debian ruby/rails packages that you have
first, then use the method in the blog post I linked to. I’d install
ruby 1.8.7 instead of 1.8.6 that’s mentioned in the blog though.

Arthur R. wrote:
I've been having great fun trying to deploy a fresh 
install of rails on
debian, specifically xlsuite to test it out, but my god how many more
errors can I take before I give up.

RAILS IS NOT NICE

After battling with countless different errors from trying Ubuntu,
Fedora, Windows and now Debian the list goes on and on and ON…


My approach is to freeze all of your rails and gems into your system. Its usually all ruby (except for the odd library) and for me it has worked between Ubuntu and Windows without problems (other than unavoidable OS stuff). If you freeze it you know that you have the same version of ROR and all of your gems no matter where you deploy. You are only depending on the system you go to to have a working version of ruby and a database that really works (and puts its sockets in the same place as others). There is an approach in Rails Recipes to handle the sockets which different distributions seem to misplace.

Norm

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

On Aug 24, 9:26 pm, Arthur R. [email protected]
wrote:

a clue and forums are just a nice place to get lost and go round in
Posted viahttp://www.ruby-forum.com/.
Yeah freaking with “NOTHING WORKS!!!” isn’t really the best
approach when… trying to do anything. Regardless, having never heard
of xlsuite before your post, I figured I’d try to get it running to
try to see where things might go have gone wrong.

First, ran git clone git://github.com/xlsuite/xlsuite.git. Then, as
you mentioned the “ActionController::AbstractRequest (NameError)”
error, I tried to find out from their site what version of Rails it
requires. Apparently doesn’t matter, as they’ve frozen Rails with
their app, so it will always use the bundled version rather than
whatever you happen to have installed via RubyGems. Next, I followed
the instructions in the INSTALL file:

= Basic Installation

XLsuite is built on-top of MySQL and cannot currently use any other
database servers.

  1. cp config/database.yml.sample config/database.yml
  2. Edit config/database.yml to suit you (must use MySQL)
  3. rake db:create db:structure:load db:bootstrap
  4. script/server
  5. http://localhost:3000/

= Complete Installation

You will need to register an account at Amazon’s Web Services to use
the Simple Storage Service (S3). XLsuite stores it’s assets in S3.
You may configure Asset to store the files on the local filesystem by
changing the :storage key of the #has_attachment call to :file_system.

If you want to integrate with Google Maps, you’ll need a Google Maps
API key. Update the Configuration named :google_maps_api_key with
your key.

= Running the tests

  1. rake db:create RAILS_ENV=test
  2. rake

After creating my database user and configuring database.yml
accordingly, I ran “rake db:structure:load db:bootstrap” (as I don’t
give my development roles SUPER privileges." I did get an error here
though:

(in /home/xeno/projects/
xlsuite)
Missing these required
gems:
RedCloth ~>
4.0

You’re running:
ruby 1.8.7.72 at /usr/bin/ruby1.8
rubygems 1.3.5 at /home/xeno/.gem/ruby/1.8, /usr/lib/ruby/gems/1.8

Run rake gems:install to install the missing gems.

So I ran sudo rake gems:install (again, I’m not running as the
superuser). RedCloth installed successfully, as did the database rake
commands now. Then I ran ./script/server, browsed to
http://localhost:3000,
and after waiting for whatever it is XLSuite does, was greeted with
the login page.
a
Relevant information for my environment is:

[email protected]:~/projects/xlsuite$ cat /etc/issue
Ubuntu 9.04 \n \l

[email protected]:~/projects/xlsuite$ ruby -v
ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]

Using the distro’s Ruby, not anything custom compiled here. So,
before trying to hack away for no reason at code you do not
understand, what are the errors you’re encountering, and what are
you doing to resolve each individual error as it happens?

Arthur R. wrote:

I’ve been having great fun trying to deploy a fresh install of rails on
debian, specifically xlsuite to test it out, but my god how many more
errors can I take before I give up.

RAILS IS NOT NICE

After battling with countless different errors from trying Ubuntu,
Fedora, Windows and now Debian the list goes on and on and ON…

Try Heroku. “git push heroku master” and you’re deployed. End of
story.

http://heroku.com

  • D

ok guys, stage 2

got through to run rake rake db:create db:structure:load db:bootstrap
but got the rmagick error again, although it is installed and works for
other apps

any ideas?

I’ve tried quite a few installs but it seems to fail

Thanks for all of the posts,

AplhaBlue - sorry fell asleep

Maurício -agreed, wasnt the best tone…

Jason S. (thanks)
debian - and Ruby is a little odd so first was to get the basic bundle
of Ruy working, got it correct now to v1.8

then did the pharrington routine and

same process

rake gems:install produced nothing but error, to start with I had

nokogiri missing cant load file…

manual install of the gem and re try

then had FightTheMelons constant not found

then imagemagick /rmagick was missing - still couldnt get this working

then RedCloth (as yours did)

but couldnt run the db:create at all,

have rails v.2.2.2 now in place tried it as above and it still failed to
run

Danny, tried your idea and it worked

Thanks all, I eventually went back to Fedora and it worked with the
instructions combined from above. :slight_smile:

this is on Debian again, - Fedora worked ok but I have to learn how to
do this!!!

got debian & xlsuite working, nearly, ran script/server and got some
errors

NoMethodError in Pages#show

Showing app/views/accounts/new.html.erb where line #8 raised:

You have a nil object when you didn’t expect it!
The error occurred while evaluating nil.name

this happens on all pages. /admin, etc

is there a way to turn this error trapping off in rails/ruby? or is this
some data missing in the db?

thanks
Arthur

For “rmagick” error: have u got the following debian packages
installed?

imagemagick
librmagick-ruby
librmagick-ruby1.8

on debian, check using
dpkg --get-selections | grep magick

Pradeep

still in xlsuite get the nil errors…

On Aug 25, 8:35 am, Arthur R. [email protected]
wrote:

this happens on all pages. /admin, etc

is there a way to turn this error trapping off in rails/ruby? or is this
some data missing in the db?

You’ll get a lot farther if you read the error messages. The message
above is telling you there’s an error on line 8 of app/views/accounts/
new.html.erb. The offending bit of code is:

@_parent_domain.name

That variable is set in a before_filter on AccountController, line
386:

@_parent_domain = self.get_request_parent_domain

get_request_parent_domain is defined on ApplicationController, lines
457-466. It’s looking for a Domain record to match the last parts of
the incoming request’s domain. If none is found, it’s returning
Domain.find_by_name(‘xlsuite.com’).

Digging around further, it appears that the db:bootstrap rake tast
(that it tells you to run in INSTALL) sets up the initial host mapping
for localhost - or tries to, as I think it will only work if you’ve
set up subdomains off of localhost (it drops the first part of the
domain).

If you’ve got it deployed on a server with a DNS name rather than
locally, you’ll either need to make sure that it’s set up with a
subdomain (xlsuite.somedomain.com vs. somedomain.com) or you could
simply change the default case the the bottom of
get_request_parent_domain to return the right record.

Hope this helps!

–Matt J.

On Mon, Aug 24, 2009 at 8:26 PM, Arthur
Rats[email protected] wrote:

fresh install of debian - not the best choice I know for rails

Works fine for me, something like 5 years now.


Greg D.
http://destiney.com/

thanks! working better now

matt, thanks,

dont suppose you can work this one out…

login [email protected]
pw: adminadmin

as per the bootstrap rake task it should load the values into the db, it
does and a record is created for parties with a pw but simply not
possible to log in via a browser

XlSuite::AuthenticatedUser::UnknownUser

i can trace it back to see that in xlsuite and see email.routable is set
but doesnt seem to work,

i’ve dropped the db - re tried and still the same

I’ve been into Ruby now for a few months and still learning so thanks
for your support…

greg, gem update --system is disabled in debian along with other strange
things I’ve noticed so it isnt the easiest for a noob.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs