SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jun 2007
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    'Pre' Problems with Patrick Lenz's Rails book …

    Email : simonwhel@yahoo.com

    “If I can do it then it can’t be done ! …”.

    As Dr. Nick of the Simpsons sez :

    Hi Everybody !

    I recently selected Patrick Lenz’s book ‘Build Your Own Ruby on Rails Web Applications’ as the text I plan to use to help me create my 1st Ruby on Rails (RoR) web application.

    I’ve been fooling around with both Ruby and Ruby on Rails for some time now.

    This means that I’ve downloaded and installed a couple of RoR development environments (Locomotive and RadRails) before sitting down with Patrick’s book to seriously start learning RoR in a more disciplined and methodical way.

    So, one of the 1st steps would be to follow the installation instructions given in Chapter 2 – Getting Started (pp. 15-50).

    By the way I’m developing on a 1.8 GHz PowerPC G5 Macintosh running Mac OSX 10.4.9 .

    But, it occurred to me that it would probably be a good idea to erase from all the hard drives connected to my system all the Ruby and Ruby on Rails development environments and supporting Ruby and Rails files and directories from my system before I started with Patrick’s installation instructions.

    My reasoning here is that it is best to start with a clean slate. If I leave any of the files from the above mentioned development environments or any of the files needed for both Ruby and Rails on my system then there is a possibility that confusion and conflicts over which files should be used and where and when such duplicate files could be used and accessed could create confusion and cause difficult to track down problems.

    So, I deleted all the files in both the Locomotive and the RadRails development environments.

    I then did global searches on both ‘Ruby’ & ‘Rails’ to find any other files and directories that seemed to contain directories and/or files that looked like they might be used by either or both of Ruby and/or Rails.

    I say ‘looked’ here because I’m not absolutely sure what and where all the Ruby and Rails files and directories are.

    After I did that, I decided to run a test to try to determine if I’d actually erased all the Ruby and Rails files and directories.

    So, here’s what I did :

    1. I brought up the ‘Terminal’ application.

    It’s window displayed the following text :

    Last login: Sat Jun 23 22:04:50 on ttyp1
    Welcome to Darwin!
    user-387hpgr:~ simonwhelan$

    At the ‘$’ prompt I typed in the following text :

    Rails damnation

    I expected to get back some sort of error message like : ‘File/Command not found’

    Instead I got the following text :

    create
    create app/controllers
    create app/helpers
    create app/models
    create app/views/layouts
    create config/environments
    create components
    create db
    create doc
    create lib
    create lib/tasks
    create log
    create public/images
    create public/javascripts
    create public/stylesheets
    create script/performance
    create script/process
    create test/fixtures
    create test/functional
    create test/integration
    create test/mocks/development
    create test/mocks/test
    create test/unit
    create vendor
    create vendor/plugins
    create tmp/sessions
    create tmp/sockets
    create tmp/cache
    create tmp/pids
    create Rakefile
    create README
    create app/controllers/application.rb
    create app/helpers/application_helper.rb
    create test/test_helper.rb
    create config/database.yml
    create config/routes.rb
    create public/.htaccess
    create config/boot.rb
    create config/environment.rb
    create config/environments/production.rb
    create config/environments/development.rb
    create config/environments/test.rb
    create script/about
    create script/breakpointer
    create script/console
    create script/destroy
    create script/generate
    create script/performance/benchmarker
    create script/performance/profiler
    create script/process/reaper
    create script/process/spawner
    create script/process/inspector
    create script/runner
    create script/server
    create script/plugin
    create public/dispatch.rb
    create public/dispatch.cgi
    create public/dispatch.fcgi
    create public/404.html
    create public/500.html
    create public/index.html
    create public/favicon.ico
    create public/robots.txt
    create public/images/rails.png
    create public/javascripts/prototype.js
    create public/javascripts/effects.js
    create public/javascripts/dragdrop.js
    create public/javascripts/controls.js
    create public/javascripts/application.js
    create doc/README_FOR_APP
    create log/server.log
    create log/production.log
    create log/development.log
    create log/test.log
    user-387hpgr:~ simonwhelan$

    The forgoing text pretty clearly indicates to me that I somehow managed to execute the Rails script that creates a Rails project named ‘damnation’.

    Sure enough, if I look on my hard drive called ‘Tiger10.4.6’ under ‘Users/simonwhelan/’ there’s a directory called ‘damnation’ containing all the files and directories of a Ruby on Rails project.

    What I don’t understand is if I erased all the files that looked like they had anything to do with Ruby and Rails software development then why is my system able to generate a Rails project for me ?

    This strongly suggests that I’ve actually missed the Ruby and Rails files and directories that constitute the actual development files for Ruby & Rails.

    If that’s true then where are they ? I’ve looked and looked for them on my system but I just can’t seem to find them.

    What am I doing wrong ?

    Can anyone give me some suggestions or advice as to how I can completely erase the Ruby and Rails development files & directories from my drive ?

    I’d like to start with a completely clean slate as far as Ruby and Rails are concerned before I start with Patrick’s installation instructions so I can avoid hard to figure out and track down problems caused by file & directory ambiguities in the future.

    Any help and advice that anyone could send me would be greatly appreciated.

    I’d like to thank in advance every one for any and all help you might be able to send to me.

    Comme toujours, here is my contact information :

    1. Email : simonwhel@yahoo.com
    2. Phone : 718-777-7731

    The easiest times to reach me are in the mornings before 11:00 AM or in the evening after about 7:00 PM.

    All the best & talk to you soon … Simon.

  2. #2
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not familiar with OS X but on Linux you can do `whereis rails` in the terminal. This tells you where the rails executable is.

  3. #3
    SitePoint Member
    Join Date
    Jun 2007
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Interesting, Informative & Educational but Not Helpful …

    Email : simonwhel@yahoo.com

    “I’d rather have a full bottle in front of me than a full frontal lobotomy …”.

    Hi Fenrir2 :

    1st off, I’d like to thank you for taking the time to make your suggestion; i.e :

    I'm not familiar with OS X but on Linux you can do `whereis rails` in the terminal. This tells you where the rails executable is.

    It was illuminating, informative and educational.

    Unfortunately, it didn’t seem to solve the problem. In fact, if anything it made the whole situation even more mysterious for me.

    Allow me to explain …

    If I type in ‘whereis rails’ (as you very helpfully suggested, all I get back is the prompt; i.e. :

    simon-whelans-power-mac-g5:~ simonwhelan$

    I kind of thought I would get back either :

    1. Some sort of string indicating the directory path to where Rails is.
    2. Some sort of text response something like : ‘Gee, I dunno …’.

    Now, just out of curiosity I typed in the following string after the prompt :

    whereis ruby

    For that, I get the following :

    /usr/bin/ruby

    So, it would seem that I do have Ruby installed somewhere.

    The problem is that I can’t find ‘usr/bin/ruby’.

    What I mean by that is that using the ‘Find’ (i.e. : ‘?F’) command I can’t find the damn ‘/usr/bin’ directory.

    Now, I realize that the files and directories I’m looking for are ‘hidden’ and they’re probably hidden fro a very good reason; i.e. : they’re hidden to keep ignorant doofuses like me from inadvertently doing ourselves serious harm. But, the fact is, I’d really like to find the files. And, in addition, I’d like to know how to find these files.

    I swear to God, I’m starting to feel like Wonder Woman when she’s looking for her goddamned ‘Invisible Airplane’ (Now that I think of it : How do you find an Invisible Airplane ? I mean do you wander around in the approximate area that you seem to remember you last left it hoping that sooner or later you’ll bark your shins on the damned thing … Now, I’m really wondering …).

    Anyhow I tried running the ‘rails damnation’ command again from the Terminal prompt :

    And, sure enough, the damned system generates a Rails project named ‘Damnation’.

    So folks (and, of course, folkettes, I’m not damned chauvinist), I guess I now have 2 questions :

    1. How do I find ‘/usr/bin/ruby’ so I can zap it ?
    2. How can I be creating Rails projects if I don’t seem to have Rails installed anywhere on my system ?

    Any help and advice that anyone could send me would be greatly appreciated.

    I’d like to thank in advance every one for any and all help you might be able to send to me.

    Comme toujours, here is my contact information :

    1. Email : simonwhel@yahoo.com
    2. Phone : 718-777-7731

    The easiest times to reach me are in the mornings before 11:00 AM or in the evening after about 7:00 PM.

    All the best & talk to you soon … Simon.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •