Finally fixed it. I forgot to replace a couple other 'blog' with 's. I wasn't specifically able to push the change out by updating the unicorn.rb file. I ended up renaming the 'unicorn.blog.sock' and that fixed it.
Is there a way to view a log output from Unicorm like WEBrick? My app is deploying correctly, but isn't running correctly off the sever. I'm just getting the useless error pages.
Great tutorial. I'm new to Rails development. I'm finally making the switch from PHP to Ruby! And all of your videos are helping out immensely. Thanks so much.
The information for implementing cancan hasn't really changed much for Rails 3. You can check out the wiki for cancan, which is what I recently used to get it up and running on my app: CanCan wiki
I am also interested in this question.. in the first few steps of my multistep form I am working with user attributes, but in the next one I am working with user "interests" which is currently setup with a different model (related to the user using a HABTM)
How does one use queue_classic with rubber/capistrano? It seems like rake qc:work needs to run, just not sure where to put that command (in deploy.rb?) Thanks!
I am using guard-rspec inside a vbox virtual machine (I cannot upgrade my Mac OS X 10.5.8 at this time, so this way I am developing on a virtual copy of the of the production OS, ubuntu 10).
Anyway it works great! But I would love to make use of guard-livereload.
Can anyone think of a way to have it both ways. IOW, running guard on the virtual machine and have it some how trigger livereload on my host MAc system?
Hi Ryan,
Is it possible to add session variables as log tags to the log file or maybe some other way to add that info against each request?
I am migrating an app over from Rails 2.0 and only thing I can't get to work is adding session[:user_id] to the log output for each request.
Earlier it was done using monkey-patching ActionController's "log_processing" method.
Which does list the entry properly, but even if I add another one, it will not save it. The resulting json list is in proper array format (I can see it with: http://localhost:3000/list_formats.json?q=hard), so I'm still missing something.
I was able to create the relationship with a many to many, but with a many to one (where the book table has a corresponding ID for the format table for example) it doesn't work.
I can search but it will not save the values, nor will it prepolue the existing ones.
I'm sure I'm doing something wrong, but I pretty much copy/pasted the one for authors. Is there anything else that needs to change for this to work?
I don't get any javascript errors or warnings whatsoever.
Hey Ryan, I'm new to Rails and this is exactly the type of thing I was working on doing a few days back :)
Primarily, because I learn by deconstructing, and I definitely, found too much noise + magic so far;
Please continue diving into Rails internals as this should be elucidated to the community as much as possible (it probably is I guess, but you also end up tremendously easing adoption by newcomers)
This is as close as I've come to finding a good tutorial. I'm not skilled enough to reconcile the differences between that walk-through and this Railscast.
Hi. . . another great cast. . .
Any pointers to tutorials for using ipaddress with geocoder.
I've tried a few things but have not gotten it to work.
Many thanks
I'm having an issue. I have everything installed properly, in fact I even have the website up in localhost with a little bit of style to it. My issue is my admin panel doesnt look like that of which is in this video. For instance: Under those tabs body and side body, im missing that "tool bar" per-say. Where it gives the options of including h1 h2 tags, inserting images, html, et. Why is that?
Also when I click advanced options, nothing happens, also; I cant slide the top tabs the way I like them. Which seems fluid in this video. I'm using windows.
I suppose ,it will not work on rails 3.2
Following worked on my enviroment.
1 add Gemfile and bundle
ruby
group :testdo
gem 'rspec-rails'
gem 'cucumber-rails'
gem 'database_cleaner'
gem 'factory_girl_rails'end
2 install them
bash
rails g rspec:install
rails g cucumber:install
rails g factory_girl:model YourModelName --dir=spec/factories
3 add features/support/env.rb
ruby
require 'factory_girl_rails'
4 make your *.feature and *_steps.rb file
Now cucumber dosnt use webrat but capybara . I cant find steps file for capybara. so you have to make steps.rb file by yourself,
referencing to https://github.com/jnicklas/capybara.
Hey jDeppen thanks for posting this. Is this the only change you made? I tried it and am getting this error when starting Nginx:
error code
Restarting nginx: nginx: [emerg] host not found in upstream "unicorn" in /etc/nginx/sites-enabled/blog:21
nginx: configuration file /etc/nginx/nginx.conf test failed
I have 2 apps, blog and blog2. Followed Ryan's recipe verbatim with both apps, with one change (besides using blog2 in 2nd app). I have 2 domains propagated to my VPS and am using those as the server_name on line 7 of nginx.conf. I've been doing some Googling to see if there's anything I need to be doing with my hosts file, but no enlightenment.
I know this thread is a bit old, but I was wondering if anyone has tried to pass the page param through a link to the show page.
Say I have a paginated list of users and I click on the show link for a particular user to see the info for that user, OK. HOWEVER, when I click the "Back" link it just does the index page from the start, instead of the "page" that it was on.
So, I am not sure how to go about passing the page param back and forth between the show page and the index page.
This seems like something most everyone would want?...
but for some reason that throws out an error. Firebug tells me the error is 'value undefined' and the token input drop down list disappears. I just don't get it. If the authors is empty it will return the new field just fine but if it finds any results it does not like the new added in.
The current select2-rails gem has 114 downloads so far, if it helps you. :)
I think you need "%" like this if you try the last tutorial .
I'm getting an error when I first run cap deploy. I have put up the error I'm getting here but can't seem to find the soloution anywhere.
Error with cp
Any ideas?
Finally fixed it. I forgot to replace a couple other 'blog' with 's. I wasn't specifically able to push the change out by updating the unicorn.rb file. I ended up renaming the 'unicorn.blog.sock' and that fixed it.
He means that its annoying to use "libpq" instead of "libpg" (the average joe won't know that thats the name of the library) - not the "-dev" part.
Thank you for this excellent episode! One of the most eye-opening ever.
Is there a way to view a log output from Unicorm like WEBrick? My app is deploying correctly, but isn't running correctly off the sever. I'm just getting the useless error pages.
+1 for handling associations
Great tutorial. I'm new to Rails development. I'm finally making the switch from PHP to Ruby! And all of your videos are helping out immensely. Thanks so much.
The information for implementing cancan hasn't really changed much for Rails 3. You can check out the wiki for cancan, which is what I recently used to get it up and running on my app: CanCan wiki
Thanks :)
cool site. has already proven to be extremely useful for me as i have been scoping out ipad cases recently, and came across this: http://www.kickstarter.com/projects/552506690/brydge-ipad-do-more
I am having an error, that gets caught on the browser:
Uncaught TypeError: Object [object Object] has no method 'up'
On the line:
What might possibly be the cause for this?? I already saw both railcast and source code, but cannot find the solution
I am getting pretty frustrated on this! I would really appreciate some help here! thanks
Love these revised episodes. Would really like to see the episode on Cancan revised. :)
I wish CodeRay had a CoffeeScript scanner. That's really the only thing that tempts me to switch to Pygments.
Can you please tell me how did you resolve this issue. I am using Devise for Authentication and I am getting this error.
I had loaded the entire database through the schema.rb thereby not requiring any migrations to be run. But still I am facing the same issue.
Please help me resolve this issue as I am stuck with this from the past few days and unable to deploy my application on heroku because of this issue.
Agreed. I had to make the same change to get it to work. Thanks!
Hey!
Following the activemodel source code, the initialize method should check if the attributes isn't nil.
Without it, I got errors running my specs
I am also interested in this question.. in the first few steps of my multistep form I am working with user attributes, but in the next one I am working with user "interests" which is currently setup with a different model (related to the user using a HABTM)
Thanks! Awesome work!
+1
+1
thanks ;-)
+1
Your problem might be the same issue as mine. The object.send(association) doesn't seem to work for has_one relationships.
Anyone else have this issue or a solution?
Thanks
How does one use queue_classic with rubber/capistrano? It seems like
rake qc:work
needs to run, just not sure where to put that command (in deploy.rb?) Thanks!How does this stack up Padrino? As far as performance and ease-of-use?
I am using guard-rspec inside a vbox virtual machine (I cannot upgrade my Mac OS X 10.5.8 at this time, so this way I am developing on a virtual copy of the of the production OS, ubuntu 10).
Anyway it works great! But I would love to make use of guard-livereload.
Can anyone think of a way to have it both ways. IOW, running guard on the virtual machine and have it some how trigger livereload on my host MAc system?
Hi Ryan,
Is it possible to add session variables as log tags to the log file or maybe some other way to add that info against each request?
I am migrating an app over from Rails 2.0 and only thing I can't get to work is adding session[:user_id] to the log output for each request.
Earlier it was done using monkey-patching ActionController's "log_processing" method.
Turns out that the field expects the values to be an array and in a many to one the result is a string so I've amended the code to this in the form:
Which does list the entry properly, but even if I add another one, it will not save it. The resulting json list is in proper array format (I can see it with: http://localhost:3000/list_formats.json?q=hard), so I'm still missing something.
Thanks.
I was able to create the relationship with a many to many, but with a many to one (where the book table has a corresponding ID for the format table for example) it doesn't work.
I can search but it will not save the values, nor will it prepolue the existing ones.
I'm sure I'm doing something wrong, but I pretty much copy/pasted the one for authors. Is there anything else that needs to change for this to work?
I don't get any javascript errors or warnings whatsoever.
Thanks.
Please disregard, I was being an idiot and my method in book.rb had this
Instead of this:
What about we don't get user email from twitter, and I want user to specify it manually like you did with devise+omniauth in ep 236?
Thanks Ryan, definitely a good idea to dive into internals.
yep!
Thanks! Bootstrap datepicker worked well for me
Love it! keep diving deeper!
This works perfectly.
+1
And versioning!
I tried this as well and I get the same error. I even tried this:
Hey Ryan, I'm new to Rails and this is exactly the type of thing I was working on doing a few days back :)
Primarily, because I learn by deconstructing, and I definitely, found too much noise + magic so far;
Please continue diving into Rails internals as this should be elucidated to the community as much as possible (it probably is I guess, but you also end up tremendously easing adoption by newcomers)
Thanks!
This is as close as I've come to finding a good tutorial. I'm not skilled enough to reconcile the differences between that walk-through and this Railscast.
Have you found anything?
Great episode! I would love to see a screencast on how to build a OAuth2 protected API with that ;)
Hi. . . another great cast. . .
Any pointers to tutorials for using ipaddress with geocoder.
I've tried a few things but have not gotten it to work.
Many thanks
How can I add a delete button column using the json/ajax approach? Here's what I'm trying to replicate:
<%= link_to 'Delete', product, method: :delete, class: "btn btn-mini btn-danger", confirm: "You sure?", title: product.product_number %>
I like this episode a lot. Nevertheless, here's the inevatibable "but":
What first came into my mind when I was reading the headline was something like stripping down Rails itself into its components.
I see your point in trying to get to a minimal rails application. Yet, you would still have to install the full rails stack.
But would it also be possible to have a minmimal rails app running with only those modules installed, that are actually required by the application?
Where one might eventually end up with somthing like Sinatra for micro appslications?
I'm having an issue. I have everything installed properly, in fact I even have the website up in localhost with a little bit of style to it. My issue is my admin panel doesnt look like that of which is in this video. For instance: Under those tabs body and side body, im missing that "tool bar" per-say. Where it gives the options of including h1 h2 tags, inserting images, html, et. Why is that?
Also when I click advanced options, nothing happens, also; I cant slide the top tabs the way I like them. Which seems fluid in this video. I'm using windows.
enclosed an image to see the lack of tool bar:
http://i50.tinypic.com/2zptemp.png
I suppose ,it will not work on rails 3.2
Following worked on my enviroment.
1 add Gemfile and bundle
2 install them
3 add features/support/env.rb
require 'factory_girl_rails'
4 make your *.feature and *_steps.rb file
Now cucumber dosnt use webrat but capybara . I cant find steps file for capybara. so you have to make steps.rb file by yourself,
referencing to https://github.com/jnicklas/capybara.
Hey jDeppen thanks for posting this. Is this the only change you made? I tried it and am getting this error when starting Nginx:
I have 2 apps, blog and blog2. Followed Ryan's recipe verbatim with both apps, with one change (besides using blog2 in 2nd app). I have 2 domains propagated to my VPS and am using those as the server_name on line 7 of nginx.conf. I've been doing some Googling to see if there's anything I need to be doing with my hosts file, but no enlightenment.
Thank you Ryan. Very well job.
I know this thread is a bit old, but I was wondering if anyone has tried to pass the page param through a link to the show page.
Say I have a paginated list of users and I click on the show link for a particular user to see the info for that user, OK. HOWEVER, when I click the "Back" link it just does the index page from the start, instead of the "page" that it was on.
So, I am not sure how to go about passing the page param back and forth between the show page and the index page.
This seems like something most everyone would want?...
Does anyone know how to add the new
to the results when token input can find something? I tried just doing
but for some reason that throws out an error. Firebug tells me the error is 'value undefined' and the token input drop down list disappears. I just don't get it. If the authors is empty it will return the new field just fine but if it finds any results it does not like the new added in.