SitePoint Sponsor

User Tag List

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

    Simply Rails 2 Chptr 10 taggable plugin problem

    Hi,
    I'm having trouble getting the acts_as_taggable_on_steroids plugin to work. I've downloaded from updated git site
    installation seems to go OK but at the end, this message appears
    ...............
    + ........................
    + ./test/fixtures/taggings.yml
    Plugin not found: [" URL /acts_as_taggable_on_steroids.git"]
    (I haven't made 5 posts yet so no actual URL)
    I've rolled back migration 6, deleted the plugin and removed acts_as_taggable code from story.rb and reinstalled with and without --force option but no joy.

    when working in script/console
    s = Story.find( :first) ............ returns data but
    s.tag_list ........... gives a long error list ending in
    shovell/vendor/plugins/acts_as_taggable_on_steroids.git/lib/acts_as_taggable.rb:17
    I'm using rails 2.0.2
    I'm at a bit of a loss now so any help etc

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,044
    Mentioned
    187 Post(s)
    Tagged
    2 Thread(s)
    The install "seems" to go OK, but you get
    Plugin not found: ......
    Sounds like a folder path/file type problem.


    I downloaded using this at the console prompt
    Code:
    \shovell>ruby script/plugin install http://svn.viney.net.nz/things/rails/plugins/acts_as_taggable_on_steroids/
    And didn't have any problems.

  3. #3
    SitePoint Member
    Join Date
    Oct 2007
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I downloaded using the svn URL
    in the development console, this error was raised
    >> s = Story.find( :first)
    RuntimeError: acts_as_taggable_on_steroids has been moved to github:
    .......... jviney/acts_as_taggable_on_steroids
    from /home/roy/programming/rails_2/shovell/vendor/plugins/acts_as_taggable_on_steroids/lib/acts_as_taggable.rb:10:in `acts_as_taggable'
    ..........

    after a git rollback and downloading the git URL
    back into the development console and :
    >> s = Story.find( :first)
    => #<Story id: 1, name: "A weblog about Ruby on Rails", link: " URL poocs.net", created_at: "2009-09-29 00:56:08", updated_at: "2009-10-15 12:51:58", user_id: 1, votes_count: 4, description: nil>
    >> s.tag_list
    NoMethodError: You have a nil object when you didn't expect it!
    You might have expected an instance of Array.
    The error occurred while evaluating nil.empty?

    I am mystified!! After each rollback to migration 5, the acts_as directory was deleted from vendors and the migration 6 file also deleted.
    Any suggestions?

  4. #4
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,044
    Mentioned
    187 Post(s)
    Tagged
    2 Thread(s)
    It's been a while since I worked through the book. I was trying to remember what connection there was between "description" (ch. 9) and "tags" (ch. 10).

    Darned if I see it. Because the description is nil, I'm wondering if you may have missed a step back in chapter 9? As far as you know, everything was OK for chapter 9?

    As far as things being deleted, I think that's something Rails does "for you" to make things "easier" when you do a rollback.

    Not much I can think of as a suggestion other than to go through chapter 9 again to make sure everything is OK. In particular, why description is nil.

  5. #5
    SitePoint Member
    Join Date
    Oct 2009
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I was able to rollback the migration, but I can't get acts_as_taggable_on_steroids to install from github. Due to the spam controls on this forum I apparently can't post website addresses. As such I've had to edit them out of the error messages below.

    I have git installed, but get the following:
    If I use the ruby script/plugin install command from the book corrections page
    I get the following:
    Initialized empty Git repository in .git/
    warning: Option "depth" is ignored for "github jviney" /acts_as_taggable_on_steriods.git
    fatal: Couldn't find remote ref HEAD

    If I change the 'http' to 'git' in the install command I get the following:
    Initialized empty Git repository in .git/
    fatal: The remote end hung up unexpectedly

  6. #6
    SitePoint Zealot atetlaw's Avatar
    Join Date
    Feb 2007
    Location
    Melbourne, Australia
    Posts
    171
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    On the errata page for the book (http://www.sitepoint.com/books/rails2/errata.php) there's this message:

    Since publication of the book, the acts_as_taggable_on_steroids plugin has moved from using SVN to Git for version control. This means that the URL provided in the book will no longer work for installing the plugin.

    To fix this, you first need to install Git, instructions for which can be found in this article.

    Once you've installed Git, run this command to install the plugin (all on one line):

    ruby script/plugin install
    http://github.com/jviney/acts_as_tag..._steroids.git/
    --force

    The --force option is there to force the installer to overwrite the earlier failed installation, you can remove this if you haven't already tried to run the code from the book.

  7. #7
    SitePoint Member
    Join Date
    Oct 2009
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I was following the notes on the errata page. While I had downloaded and installed git I had to run the command sudo port install git_core and then install the plugin.
    After that everything worked.


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
  •