![]() | Updated ebook and code: 06 April 2012 |
|
06 Apr 2012, 20:03
John M Athayde (39 posts) |
Change log:
|
|
06 Apr 2012, 22:20
John M Athayde (39 posts) |
Looks like the readme file didn’t get into the code. Here it is: Rails applications for chapters Each directory contains a Rails application for a specific chapter:
Background Each application is designed to illustrate the concepts
Application Setup
Each application includes an You don’t need to use RVM or a gemset if you prefer. Just keep in mind For more information see the Preface in the book text.
To get a chapter application running, first change to that directory
(If you are using RVM, it may prompt you to confirm that you trust the If you haven’t installed it yet, you need Bundler:
Install the dependencies for the application:
Please report any issues you have installing on the forum. It’s Here are some known issues:
If you run into a problem installing Nokogiri, first see the Nokogiri Problems have been reported with OSX Lion and Xcode 4. libxml2, — Once you have the dependencies installed, set up the database.
To get the (SQLite3) database set-up and ready to go, we’ve provided a
(If you’d like to use something other than Rails’ default of SQLite3, Next, start the server and view the site:
Start the server with the
Now point your favorite browser (we recommend Chrome or Firefox) at:
IMPORTANT: Check the README of the specific chapter |
|
06 Apr 2012, 21:49
Bharat Ruparel (146 posts) |
Nice! Will review and be in touch :) |
|
07 Apr 2012, 02:58
Akshay Kumar (6 posts) |
Shweet. I tired the app for the layout chapter earlier today. So far looks good. |
|
07 Apr 2012, 07:23
Michael Schuerig (12 posts) |
I’m unclear if the example apps are meant mostly as illustration or whether they are supposed to work.
I can give more specifics, if needed. But, as I said, I’m not sure if the code is even expected to work perfectly. |
|
07 Apr 2012, 09:08
Bruce Williams (14 posts) |
Michael, Thanks for the comment. Specifics would be helpful I think; this is just the first in several updates as we progress through errata and work to make the examples more consistent across chapters (a problem we’ve run into due to divergent branches and a chapter reordering). We’re especially interested in failures during the documented setup and at the specific URLs covered in the chapters. You’re right in that the apps are supposed to illustrate specific techniques in the view; they’re certainly not fully exercisable apps (not least of which because we stub out authentication)... but they should work as described in the book. If they don’t, then it’s something we’ll fix as quickly as possible (and, in the interim, add to a list of known issues). Thanks again for the feedback, we really do appreciate it. (Note: I’ll be out for the weekend, family plans off the grid, so please forgive my inevitable late replies.) |
|
07 Apr 2012, 15:25
Mark (3 posts) |
Living in the UK amazon are reporting that its for some reason (usually shipped within 3-6 weeks) to obtain this new book, Rails Recipes: Rails 3 Edition and The cucumber book. Only ‘The cucumber book’ being in stock. In order to get a head start I’ve been waiting for the this book to be published, so downloaded the code while I wait for my books to arrive. I’ve hit a problem with running in the layouts application of the artwork chapter. `rake setup` generates the following error: —initialize_schema_migrations_table()
Is this mentioned in the body of the chapter? Obviously at present I don’t have the ebook or physical book. Can you please advise if this is a genuine problem and what the cleanest solution is? Thanks for putting in what would appear to be some long hours to sort out initial teething issues with the book. Are you including this in the Hungry Academy teachings? I’ve been following along with this as well, as not being a US resident could not apply to the internship programme. It looks to be a great pressure cooker/high intensity/fun environment to be in and supported by some knowledgable software engineers who are keen to help shape the futures of those lucky enough to be successful in applying. It would be great to see something like this in the UK where I currently live. Please don’t take this as a criticism. I’d be interested in understanding why this book didn’t go through the existing beta process? Thank you P.S. Pragpress – I’d order directly from you if you could match/get near the UK amazon pricing as this keeps the overall cost down as I’d like to buy the electronic copy as well and I know you discount these once you have the paper copy (from your email previously). I have no ideas what the shipping charges to the UK are and given the frequency I find myself purchasing your Rails/HTML/CSS and associated books, I’m sure it would add up quite quickly. Any ideas why Amazon UK has 3-6 week lead time? Is it due to surface shipping? What publishing mechanism are you utilizing for your ebooks. I learnt Rails from Michael Hartl’s excellent screencasts/pdf which have recently been update for Rails 3.2. He has published a screencast on the publishing process he uses, and it appears that for ebooks he can make updates on the fly. Are you using a similar system? |
|
07 Apr 2012, 15:12
Bruce Williams (14 posts) |
M Sutton, it looks like you’re missing ImageMagick, one of the dependencies of Paperclip (https://github.com/thoughtbot/paperclip), used to generate thumbnails. |
|
07 Apr 2012, 18:11
John M Athayde (39 posts) |
M Sutton: This might help get you up and running faster In regards to your PS questions, those are things that the publisher would know (with regard to UK lead time). I conjecture that it involves book delivery to UK distribution centers, but I can’t be sure. PragProg has a custom system for the way their books are created. Being a larger organization, it’s not as easy to just spit out an update, especially when it causes the pages to reflow, as there’s a lot of time and effort spent in making sure the book layout works well. |
|
07 Apr 2012, 19:11
Mark (3 posts) |
John Thanks for the very quick response. I googled between sending this & receiving your response and came up with the same solution. I had to edit the download as it failed initially (I think it was due to md5 checksums from further googling). It was on the fonts ‘package’. I’m looking forward to my book arriving as I like the pragmatic style of writing. Thanks once again Mark |
|
08 Apr 2012, 22:52
Bharat Ruparel (146 posts) |
I am going through the layouts chapter and is looking good! It is amazing how much a real working “demo/prototype/stubbed out app” can do to make your reading go smooth :) |
|
09 Apr 2012, 02:36
Bruce Williams (14 posts) |
Thanks Bharat! Let us know if you run into any snags down the line and we’ll fix them as quickly as possible! |
|
12 Apr 2012, 13:22
Alex Dearden (8 posts) |
Downloaded latest code version rake aborted! Cleaning up the content of /var/folder (seems it’s an Xcode-related thing) then produces the following error: rake aborted! These files do not exist in /tmp so I’m assuming the rake setup command is somehow creating them. I can see them flash across a finder window when running rake setup. Moreover, the contents for /var/folders get recreated when running rake setup. Please advise. |
|
17 Apr 2012, 02:55
Bruce Williams (14 posts) |
Alex, Sorry about the late response; last week was a rough one. These are coming out of Paperclip presumably. What is your ImageMagick (Paperclip native dependency) version? I can’t reproduce the problem locally. |
|
09 May 2012, 10:41
Alex Dearden (8 posts) |
Hi Bruce, hadn’t had time to come back to this. In all honesty I got so discouraged that I stopped reading the book altogether. I gave up. I’d like to really get back in the book as soon as I have some time which might be soon. So to answer your question: I have no idea what paperclip is or how to find out what version of imageMagick I have. If they are gems I don’t have them installed. The only imagemagick I know of was a PHP library way back when. Please advice. |
|
08 Jul 2012, 00:42
John M Athayde (39 posts) |
Alex - To find out if you have imagemagick installed, I’d open up terminal and use locate imagemagick to determine if it’s installed. You might need to spin up your locate service (locatedb) if you’ve never used it before. If you didn’t install it in the past, it’s safe to assume you don’t have it. In that case, I’d recommend using Homebrew and using that to install ImageMagick (‘brew install imagemagick’). That’ll handle the dependencies. From there, you need the rmagick gem in your app, which should already be in the gemfile. You may need to redo bundle to get it to see the binary of ImageMagick (which is actually a series of binaries). I’m sorry Bruce hasn’t replied, we’ve both been a bit slammed at work and are trying to get back on the horse with edits and articles. |
| You must be logged in to comment |

