For everyone telling me to get a subscription. I already have one or I wouldn't have been able to comment here in the first place.
I was merely pointing out that since this is suddenly a large, important, issue which has blown up in everyone's faces maybe this one time the revised episode could go out to all in the spirit of public service.
even though you posted this 2 years ago - you just helped me in a big way. I did the same thing. However - the first thing I looked at was: http://apidock.com/rails/Rails/Generator/Spec/klass
I was getting worried that klass was no longer available in the way it was being used. I thought it was going to be a very long night! :P But - it turned out to be a very easy fix - thanks to you! CHEERS!
module EcoTemplateHandler
def self.call(template)
Eco.render(template.source.inspect, template.locals)
end
end
ActionView::Template.register_template_handler(:eco, EcoTemplateHandler)
I recently found that when using the method_missing trick in my base presenter class, it raises an exception when I try to use the capture method directly.
Hi, I am using Ruby 1.9.3 and Rails 3.2.1 on Windows 64-bit machine. After following Ryan's step of adding gem 'twitter-bootstrap-rails' to my gemfile and running bundle, I get an error shown below. Any ideas on how to correct this please ?
Installing libv8 (3.3.10.4) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
>c:/Ruby193/bin/ruby.exe extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
What should i do if i want to set max_attempts for one job to 3 and some other job to 20 ? I just started using delayed_job, so i know of only place to put such configurations (initializers delayed_job_config). But is it possible to have separate configurations per job ? for example , separate config file for mailers_job and news_letters job.
Hey I like the idea for this and tried it on my system but something is broken. I am on Ubuntu 11.04 and when I try auto completion after rake it takes a while to load and then shows no options unless there are file names in the directory that I am in that begin with rake. Just no db:create or any thing like that. It was like this before and after I added the _rake to the custom directory. Do I need to add rake or _rake to the plugin call in .zshrc? Thanks for your help I am really enjoying your rails cast.
Thank you for this article. That's all I can say. You most definitely have made this blog into something special. You clearly know what you are doing, you've covered so many bases.Thanks!
Alright so I have finally solved this issue with help from stackoverflow. The issue is a conflict when combining jcrop with twitter bootstrap. The solution to my question is linked here. Its embarrassingly simple, apparently TBS sets image max width property to 100% and you simply override with with a style you create to remove this property. I was so focused on jcrop itself that I did ponder anything else causing the problem. Lesson learned, but I figured I would post for anyone elses benefit.
But most important (and I had to copy by hand) layouts/application.html.erb can make your life easier. Anyway is pretty simple (this is my version with already container-fluid class for the page_container):
And to be very clear: I do not want to start a "A is better than B" discussion. I think it's great to have choice. Refinery is great in what it does, so it's Alchemy.
I read the documents about upgrading bundler but after bundler upgraded to 1.1, the other dependent gems also changing. I don`t know that being any problem occur on existing project after bundler upgrading? How can i upgrade to bundler 1.1 without any problem?
Note - this episode was written around version 0.6.x of the faye gem. If you're trying to upgrade to a current version (0.8.7 at time of writing) then you'll need to do the following:
First, add the following to your Gemfile
gem 'thin'
Second, add the following to your faye.ru file right after the require statements.
Hi Ryan and rails cast groupies! One thing I ran into which I thought might be worth a mention:
if you develop on Linux system as I do be sure to include the gem 'therubyracer' in your Gemfile. By default refinery doesn't include it. The reason you need it is on linux there is no default JS engine. I was getting very strange behavior and lots of JS errors in my log.
If you are using RVM to manage your Rubies they recommend not using the oh-my-zsh bundler plugin - see zsh integration with RVM.
RVM provides the functionality built in to the .rvmrc file to automatically add the project --binstubs directory to your path when you cd into the project, just follow the RVM Hook instructions on the RVM bundler page. Works automatically and no more bundle exec.
Great RailsCast, Ryan! Thank you so much for covering Refinery CMS. It makes all the effort that we put into it just that little bit more worthwhile :-)
Wow, what an incredibly informative episode. I learned quite a few things - especially about my troubles getting my remote production envronment to play well with bundler. Thanks!
For everyone telling me to get a subscription. I already have one or I wouldn't have been able to comment here in the first place.
I was merely pointing out that since this is suddenly a large, important, issue which has blown up in everyone's faces maybe this one time the revised episode could go out to all in the spirit of public service.
even though you posted this 2 years ago - you just helped me in a big way. I did the same thing. However - the first thing I looked at was: http://apidock.com/rails/Rails/Generator/Spec/klass
I was getting worried that klass was no longer available in the way it was being used. I thought it was going to be a very long night! :P But - it turned out to be a very easy fix - thanks to you! CHEERS!
As always, your Railscasts are timed just right... just upgraded Bundler before watching this and got the fatal nokogiri build stuffs
For me, I had to do:
Point is, your Railscast got me in the right direction, but I needed to refer to a similar issue when previously setting up my Macbook Pro at https://gist.github.com/746966#gistcomment-80034
<%= raw render "eco_template" %>
The creation of the Category I need to pass the establishment_id how can I do this? being that he is not an attribute attr_accessible
I had the same problem is rails 3.2, thanks for the heads up.
+1 saved me a lot of hassle.
and project started!!!!
The one ryan mentioned
+1
I recently found that when using the
method_missing
trick in my base presenter class, it raises an exception when I try to use thecapture
method directly.Dumb example:
This raises
ArgumentError: wrong number of arguments (0 for 1)
From what I can tell, the reason is because it conflicts with Kernel::capture, maybe because
Kernel
always have precedence, or something.In any case, I added a hard
capture
method to my base presenter class, to work around the issue:Hi, I am using Ruby 1.9.3 and Rails 3.2.1 on Windows 64-bit machine. After following Ryan's step of adding gem 'twitter-bootstrap-rails' to my gemfile and running bundle, I get an error shown below. Any ideas on how to correct this please ?
make sure you pass "method: :delete" in your view and have jQuery.
Just a small notice...
In episode notes there is
config/split_config.rb
which should be
config/initializers/split_config.rb
Nice one!
Has someone tried to render refinerycms views throughout backbone.js like Ryan showed for "normal" Rails apps a few episodes before?
thank you for this comment!
same here, must be a 3.2 glitch
What should i do if i want to set max_attempts for one job to 3 and some other job to 20 ? I just started using delayed_job, so i know of only place to put such configurations (initializers delayed_job_config). But is it possible to have separate configurations per job ? for example , separate config file for mailers_job and news_letters job.
Hey I like the idea for this and tried it on my system but something is broken. I am on Ubuntu 11.04 and when I try auto completion after rake it takes a while to load and then shows no options unless there are file names in the directory that I am in that begin with rake. Just no db:create or any thing like that. It was like this before and after I added the _rake to the custom directory. Do I need to add rake or _rake to the plugin call in .zshrc? Thanks for your help I am really enjoying your rails cast.
It is really so nice. thank you for your share.
@3dd13
My Procfile looks like this:
Edited after reading your codaholic_chatroom on github
WORKS NOW I CAN SECURE THE CHAT
Just wondering the difference btwn
$RAILS_ENV
vs$RACK_ENV
@3dd13 could you show me your Procfile as your explanation is throwing me off a bit. Is
"rakeup -R private_pub.ru"
NOTE 'rakeup' a typo? Thanks.My Procfile looks like this:
I'm wondering about this too. What is the "performance reason"?
Thank you for this article. That's all I can say. You most definitely have made this blog into something special. You clearly know what you are doing, you've covered so many bases.Thanks!
Thank you, Jakub!!!
I suppose I should have checked that first, but again thank you very much. Was very frustrated.
it would really help me if there is a way to change the text_field to date_select or something in order to search db records by date.
i have a field named date among timestamps.
Awesome info. Thanks Ryan.
You could have talked about --deployment =(
The same is happening here, I've already installed the correct growlnotify version (MacOS 10.5.8).
Has anyone resolved this error ?
Alright so I have finally solved this issue with help from stackoverflow. The issue is a conflict when combining jcrop with twitter bootstrap. The solution to my question is linked here. Its embarrassingly simple, apparently TBS sets image max width property to 100% and you simply override with with a style you create to remove this property. I was so focused on jcrop itself that I did ponder anything else causing the problem. Lesson learned, but I figured I would post for anyone elses benefit.
Thanks for reporting that issue, I've fixed the link :)
Yep, not trying to start a fight, just defending our work. Haven't tried Alchemy, never intended to say or imply anything about it.
The page parts bug is fixed in 2.0.2. Which bug are you asking about?
Yes. To be complete, Refinery is compatible with anything you may want. As @shaman-sh sayd, it may take some time to understand how.
I found out that browsing the source of refinery-core was explanatory.
Working with these views I've been able to restyle everything I need:
But most important (and I had to copy by hand)
layouts/application.html.erb
can make your life easier. Anyway is pretty simple (this is my version with already container-fluid class for the page_container):Yes, you are right. Great work on Refinery btw.
I wanted to show people some alternatives.
And to be very clear: I do not want to start a "A is better than B" discussion. I think it's great to have choice. Refinery is great in what it does, so it's Alchemy.
Thank you Ryan.
I read the documents about upgrading bundler but after bundler upgraded to 1.1, the other dependent gems also changing. I don`t know that being any problem occur on existing project after bundler upgrading? How can i upgrade to bundler 1.1 without any problem?
Regards.
hi Ryan,
confirm "Are you sure?" at destroy not working,
i use rails 3.2.0,
How to fix?
thx for help
Note - this episode was written around version 0.6.x of the faye gem. If you're trying to upgrade to a current version (0.8.7 at time of writing) then you'll need to do the following:
First, add the following to your Gemfile
Second, add the following to your faye.ru file right after the require statements.
Load seeds into test db automatically:
http://stackoverflow.com/questions/1574797/how-to-load-dbseed-data-into-test-database-automatically
Hi Ryan and rails cast groupies! One thing I ran into which I thought might be worth a mention:
if you develop on Linux system as I do be sure to include the gem 'therubyracer' in your Gemfile. By default refinery doesn't include it. The reason you need it is on linux there is no default JS engine. I was getting very strange behavior and lots of JS errors in my log.
Otherwise great cast!
Hey Ryan - great as usual.
If you are using RVM to manage your Rubies they recommend not using the oh-my-zsh bundler plugin - see zsh integration with RVM.
RVM provides the functionality built in to the .rvmrc file to automatically add the project --binstubs directory to your path when you cd into the project, just follow the RVM Hook instructions on the RVM bundler page. Works automatically and no more bundle exec.
Great stuff Ryan. Nested forms revision will be great. Use your own Gem.
I found that for the gem provided I had to use uppercased Products otherwise I was getting an error:
/gems/activesupport-3.2.1/lib/active_support/inflector/methods.rb:229:in `const_defined? : wrong constant name product (NameError).
so
rails g bootstraped:themed Products -f (worked)
P.S. Apologies for not knowing how to nicely format this as demonstrated in some of the examples above
awesome episode, thanks for the info
Great cast ryan. Any plans on BrowserCMS?
There is a nice (somewhat oudated) comparsion here
Great cast ryan. Any plans on BrowserCMS?
There is a nice (somewhat oudated) comparsion here
Also +1. I had trouble for a while trying to figure out what I might be doing wrong.
(Thanks!)
Great RailsCast, Ryan! Thank you so much for covering Refinery CMS. It makes all the effort that we put into it just that little bit more worthwhile :-)
Seems useful to declare that you guys actually write Alchemy CMS ( judging by that you're the two largest contributors to the project :-) )
I m very new to ruby on rails, so can you help me.
I m getting the following error
this is my new form
this is my user controller
Wow, what an incredibly informative episode. I learned quite a few things - especially about my troubles getting my remote production envronment to play well with bundler. Thanks!
I had a problem with twitter-boot-strap and jcrop
The fix was to add the following to the css file
img {
max-width: none;
}
.preview{
display:block;
overflow:hidden;
}