Recent Posts
Pages: 1 2 3 4 5 6 7 8 9 10 11 ... 17
|
Sep 1, 2008
|
Topic: Church Community Discussion / small_avatar problems Finally got some free time to work on this tonight and haven’t quite identified the problem because it seems that for some reason the User class is being re-initialized after the first few requests (minus all of it’s associations, methods, etc). I’m still suspecting that it has something to do with one of the plugins – but can’t find anything yet However a quick work around for this – If you go into /config/environments – you have several environment files in there (development. production, test). These have a setting that says If you change that to true (and then restart your app) then it will only load the user model once and then keep using it. |
|
Aug 29, 2008
|
Topic: Church Community Discussion / small_avatar problems Just wanted to add my “vote.” I am having the same issue. The small_avatar is “undefined.” Just like Evan, I have seen this work once correctly, and fail many times. I tried changing small_avatar to small_avatarx, but this did not change anything. Here is the error: NoMethodError in Posts#show Showing posts/show.rhtml where line #24 raised: undefined method `small_avatarx’ for #<user:0x22b9970> 21: 22: |
|
Aug 19, 2008
|
Topic: Church Community Discussion / small_avatar problems Eldon, Definitely, I’ll send it over right away. Thanks so much for helping out! Evan |
|
Aug 18, 2008
|
Topic: Church Community Discussion / small_avatar problems Evan, I don’t think that i ever got a response from Derrick with his project. Could you zip up the project as you currently have it and send it to my above email address. Since I can’t re-create the issue in any of my versions of the application it makes it hard to troubleshoot. I won’t be able to look at it until late tommorow at the earliest, but I’ll certainly do my best to see if I can figure out what’s causing the issue for you. Eldon |
|
Aug 18, 2008
|
Topic: Church Community Discussion / small_avatar problems Hey guys, I am having a similar problem to Derrick. Whenever I try to access a comment’s user’s avatar Rails returns this: “ActionView::TemplateError (undefined method `avatar’ for #<user:0x2b4d6165f8e0>) on line #26 of posts/show.html.erb: 26: <= image_tag user.avatar.public_filename(:comment) > 27: = link_to user.name, showprofile_path(:user => user) > posted on <= comment.created_at.to_s(:short) %> |
|
Jul 26, 2008
|
Topic: Announcements / Ext JS Hi MFlynn, Glad you liked the book! Actually I haven’t gone back and done any notes on upgrading the projects to Ext 2.0. I’ve been doing contract work with the National Weather Service for the last year which didn’t have any need for any of the advanced functionality of Ext and no one had requested it so I haven’t played with Ext for quite a number of months. I did experiment with this plugin idea and thought it had some interesting ideas for making it easier for integrating Ext w/ Rails. |
|
Jul 26, 2008
|
Topic: Announcements / Ext JS Eldon, thanks for a really good book. It’s got more useable content in it than any of my stack of Rails books. Any chance you’ve been able to make some notes about converting the projects to Ext 2.0? |
|
Jul 13, 2008
|
Topic: Exercisr Discussion / Having trouble with the welcome screen Hi Eldon, It looks like copy/paste turned out horribly here. Also, I should mention that there may be version conflicts (btw the version written about in your book and the one I’m actually using) at play here. Routes.rb before: routes.rb after: |
|
Jul 12, 2008
|
Topic: Exercisr Discussion / Having trouble with the welcome screen Hi theelbster, What did your routes look like before? and after? |
|
Jul 12, 2008
|
Topic: Exercisr Discussion / Having trouble with the welcome screen UPDATE: I finally figured it out. I had to move the map.welcome line to after map.logout. I don’t at all understand why, but it works at least. |
|
Jul 12, 2008
|
Topic: Exercisr Discussion / Having trouble with the welcome screen I’m at the point in this exercise where I can create a user (name, email, password, password-conf), but when I submit that form, I get the following error: ActionController::MethodNotAllowed As far as I can tell, there is a problem with the welcome path, but I can’t figure it out. Any help would be appreciated. Here are the contents of my files: .../app/controllers/application.rb:
.../app/controllers/users_controller.rb
end .../app/views/sessions/new.html.erb: <label for="login">Login</label> <label for="password">Password</label> <! <label for="remember_me">Remember me:</label> <= submit_tag ‘Log in’ %> < end -%> .../app/views/sessions/welcome.rhtml: Welcome to ExercisrA RESTful place to keep track of your workouts |
|
Jul 4, 2008
|
Topic: Simple Blog Discussion / web services Phantom, The ideal of the REST interface is more that it supports a common set of conventions. So there’s no need to provide a WSDL to the clients. It’s just a few standard HTTP calls and processing of XML. Using ActiveResource makes it a seemingly painless process for for Ruby clients – but that doesn’t mean that other languages can’t interface to it. In fact, if you’re looking for some examples of interfacing to a RESTful Rails application from other languages – a good book to look at would be Ben Scofields Practical REST on Rails projects book. In the book, he creates a fairly simple (scaffolded) Rails application and then spends the rest of the chapters showing different ways to interface to it via REST (i.e. from a javascript widget, from a PHP (squidoo i think), facebook, etc, etc. |
|
Jul 4, 2008
|
Topic: Simple Blog Discussion / web services hi there, i need to implement web services in my rails 2.0.2 app for external apps to consume. whilst i’d prefer to do things the REST way, i’m struggling to work out what i need to supply (a la WSDL) to the other apps so that they know the structure of the request that they must send me. thanks, phantom |
|
Jun 12, 2008
|
Topic: Announcements / Starting New Book 1) Yes! The move from CRUD to RESTFul development has changed many things about how apps should be structured, and there are also the controversies in the deep-nesting vs shallow-nesting tribes. So something that would be great to understand better as a Rails newbie is how to structure applications in relation to the user activities. For instance, should I partition my app into two groups, one that is totally RESTful and essentially represents the items they present, and another group that presents HTML pages to users in ways that are very convenient to the users, but maybe not so RESTful? Another issue is how to deal with the lack of components—while there is a push to make apps look like their data model, my customers want apps that are convenient, meaning that a single page may include many different views of many models all at the same time. With components being deprecated, how do I structure something that customers like but is still Railsworthy? These are the kinds of questions that I have found most difficult. 2) It is excellent! However, please make sure that the illustrations and figures match the code purported to produce them. For instance, on Page 406 of your book, you have code for an EXTJS layout that may in fact match just the layout component of figure 18-3, but there is a bunch of stuff in figure 18-3 that doesn’t appear in that code. Rails has been a huge experiment in determining (an remembering) which expressions yield which results, based on defaults, hidden functionality, etc. There isn’t anything for theme support or a library in that code—so my natural Rails paranoia about defaults was applied to this example. Lost a lot of time as a result. 3) It was hard to follow some of the folded lines in the examples—I would use a smaller font for code to eliminate as many folded lines as feasible. 4) It would help to know what one needs to do to convert a pre-2.0 app to 2.0, particularly WRT the apps in your previous book. Also, indications as to which of the burgeoning rails 2.0 sites are the best to monitor—like everything else on the net, the signal to noise ratio is pretty low. Anything that points to resources that helps one write, upgrade and generally maintain an app across Rails version upgrades is great! I liked your book quite a lot—it is one of two that I use almost every day when coding. -r |
|
Jun 11, 2008
|
Topic: Church Community Discussion / small_avatar problems alameda[dot]eldon[at]gmail[dot]com |
|
Jun 11, 2008
|
Topic: Church Community Discussion / small_avatar problems Yes, I can send it. Where should I send the project? |
|
Jun 9, 2008
|
Topic: Church Community Discussion / small_avatar problems Derrick, I’ve gone through the app but haven’t been able to reproduce your issue. (granted my current dev system currently has ImageMagick disabled for another project I’m on) but don’t think that would make a difference. Is there any way you could zip up your version of the app and send it to me so I could take a look through your code? Thanks |
|
Jun 7, 2008
|
Topic: Church Community Discussion / small_avatar problems The small_avatar method is there. I downloaded the code that was provide from railsproject. I had the server running locally on a mongrel server. In addition, I have hosted the same code on dreamhost using their server, yet the problems persist. |
|
Jun 4, 2008
|
Topic: Church Community Discussion / small_avatar problems Hi derrick, Sorry for the delay – I’ve been at RailsConf the last week and wasn’t checking my messages back here very often. could you confirm that your user model (/app/models/user.rb) contains the small_avatar method? Also could you tell me what type of server setup you’re running? It’s extra strange if it works in console on that server but not directly from the server – unless you’ve got an old process still running an older version of the code. Thanks Eldon |
|
Jun 1, 2008
|
Topic: Church Community Discussion / small_avatar problems I’m having trouble with the small_avatar call from the photo/display.rhtml and post/display.rhtml. To ensure I was doing everything correctly, I downloaded the code from book and deployed it on the server. Unfortunately, the same problems still persist when I navigate to the pages above. What’s troubling is when I run the same code through ruby script/console it functions properly. The error is listed below. NoMethodError in Photos#show Showing app/views/photos/show.rhtml where line #15 raised: undefined method `small_avatar’ for #<user:0x3350694> Extracted source (around line #15): 12: 18: RAILS_ROOT: script/../config/.. |
|
May 9, 2008
|
Topic: Simple Blog Discussion / typo install error Hi Ron, A few initial questions for you. 1. What operating system are you installing typo on (i.e windows, mac, linux)? As for location – Typo will install itself into a new directory within the current directory that you run the command from. |
|
May 9, 2008
|
Topic: Simple Blog Discussion / typo install error Hi, I’m trying to set up a blog using Typo with the instructions in the book. I’ve got typo installed correctly, but when I type typo install there are two problems: 1) My server doesn’t recognize the command 2) I’m not sure what part of the command specifies the location I’m wondering if there’s something I’m overlooking here…I searched through the typo documentation and couldn’t find anything about installing Typo from a script.. |
|
Apr 11, 2008
|
Topic: Cool Stuff / ModRails ModRails has been released as a beta!!! Very excited to try this out (even if it does mean I’ll have to start charging less for Rails server setup) ;-) |
|
Apr 9, 2008
|
Topic: Cool Stuff / importing data into sqlite3 table Thank you for being so helpful, I’ve just loaded the data :D |
|
Apr 9, 2008
|
Topic: Cool Stuff / importing data into sqlite3 table Thanks, I’ll definitely have a look at the tutorial. For now, I think I’ll just do it through migration, though I have to first figure out how to write a proper regular expression for it. |
23:
24:
25: <= link_to user.name, showuser_path(:user => user) %> posted
26:
27: