I have also tried the stache gem but couldn't make it work with haml. I'm now using an answer on StackOverflow to include haml in the template handler but it doesn't work with chained template extensions (e.g. _foo.html.haml.mustache).
You don't need DNS out of the box since rubber will write your host entries to /etc/hosts. But if you do want DNS, rubber can manage that as well. Look at the config/rubber/rubber-dns.yml template to get started.
@robbied72, for the first year, it'd be much cheaper, since you can most likely get away with the Amazon free tier, which gives you a micro instance free for a year.
Getting error of Rails: rake db:create:all (could not connect to server)
could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
The AMIs only work in the region they were created in. If you want to use us-west-1 with Ubuntu 12.04, the AMI you want is ami-e7712aa2.
Check out the sidebar on http://alestic.com/ to get a listing of Ubuntu AMIs by region and type.
The timezone setting is just the standard set of timezone mappings from Ubuntu. If you're on the west coast, I guess "America/Vancouver" would do what you want.
When I configure AMI for us-east-1 things seems to work. But if I change the aws: to region: eu-west-1 even the staging fails with a AMI ID '' does not exist. Any ideas how to solve this? Also what shall I specify for time zone instead of US/Eastern
I am new to rails. In my application i integrate the paypal by following episode 146. In that i didn't get the order summary. For that what can i do??? Can u help me out. Thanks.
Another excellent and very useful episode. Folks, there is a pattern here. When Ryan says, "Hold on to your seats." He is not kidding. That is when he is at his best :) Hey Ryan, please make a point of saying that every week in either the "Pro" or the "Revised" episodes :)
Best regards,
Bharat
Hey Ryan, how could we validate these virtual attributes? I can validate without any problems the id that these _name setters refer to, but I can't output the feedback on the form. How could I do that? Thank you.
On 12.04, I ran into an error about the admin group not existing. All I had to do to fix it was run groupadd admin. The group is already listed in the sudoers file, it just wasn't created when the distro was installed.
Is the uid returned remains the same when an user authenticates via omniauth (twitter,facebook etc)? Can I use it as an identifier/foreign key in another model where they are able to provide extra details such as their website? If uid is going to be dynamic (for instance every time they login), then is there a way to relate their extra details with their uid?
I am using Mongodb/mongoid with my Rails project. I followed the steps given. Most of things worked. But I am stuck at making mongo to work.
the screencasts makes heavy use of config/database.yml. Should I do the same with config/mongoid.yml and make copy to config/mongoid.example.yml? What other files should I modify?
2 I suppose I should install Mongodb on Linode server and just keep it runing and pointing the production server to localhost in my mongoid.yml file. Does that sound right?
3 I wanted to make things generally working without setting up mongoid.yml correctly. But then because I have database.yml there with unused sqlite3 reference, cap deploy:cold gives error about sqlite3 not in the gemfile. I suppose if I remove config/database.yml altogether, it should not ask me to include sqlite3 any more?
These questions might be too specific to my situation. But any links to relevant information that can help me would be really appreciated.
You'll get these for a bit. There's a delay between when Amazon indicates the machine is available and when we can actually SSH into it. If it doesn't resolve itself after a few minutes, then something is wrong. But if you only see them for a couple minutes, it's nothing to worry about. EC2 is pretty variable about instance startup time.
Rubber should handle this for you. By default, the current version of rubber (2.0.1) uses ami-3c994355, which corresponds to the 64-bit instance-store Ubuntu 12.04 LTS image.
Feel free to hop onto #rubberec2 on Freenode and I'll try to help out.
+1
I'm also getting this error:
wrong number of arguments (0 for 1)
using simple_forms, even with your syntax above which, by the way, has a small typo, the last closing parentheses should be a curly brace.
Funny enough, I get this same error even if I don't use simple forms, just a regular form_for tag.
Any help would be greatly appreciated.
How to config rubber to utilize the free tier? In rubber.yml it seems you can only choose between m1.small not m1.micro
I have also tried the
stache
gem but couldn't make it work with haml. I'm now using an answer on StackOverflow to include haml in the template handler but it doesn't work with chained template extensions (e.g._foo.html.haml.mustache
).Any ideas? Thanks!
As I am in Europe! I would like to use eu-west-1. I can't get that to work. If I simply switch to us-east-1 it works. Why is that?
I love Select2 - I started with Chosen, but ended up going with Select2 for the flexibility and great looking (bootstrap friendly) styles.
Using it on a submission form on metajury.com
You don't need DNS out of the box since rubber will write your host entries to /etc/hosts. But if you do want DNS, rubber can manage that as well. Look at the config/rubber/rubber-dns.yml template to get started.
@robbied72, for the first year, it'd be much cheaper, since you can most likely get away with the Amazon free tier, which gives you a micro instance free for a year.
I really enjoyed this webcast. I'm learning a lot about RoR development daily :)
I recently stumbled upon an alternative to Janrain Engage. A product that is in development from a group called LoginRadius
Noticing that the team didn't have a RoR integration I decided to create my first gem to enable others to leverage their solution in their apps.
Note I am in no way affiliated with LoginRadius!
A friend of mine has put together a select2-rails gem if anyone is interested.
awesome, thanks!
Worked great, thanks!
how do i point the domain to ec2?? just linking the ip or do i need to set up an extra dns server??
Modify the "domain" setting in config/rubber/rubber.yml.
I would like to know how to match my own domain name instead of foo.com.
Thanks.
Ryan - Thanks for another great episode.
Anyone using Chosen with Twitter Bootstrap? Any issues?
Follow @fabiano's link, create the registrations controller then replace '/an/example/path' with '/user_steps' . Hope this helps
Getting error of Rails: rake db:create:all (could not connect to server)
could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
http://stackoverflow.com/questions/10482853/rails-rake-dbcreateall-could-not-connect-to-server
What kind of cost could I expect for a small site with say between 100 and 500 hits per day? Would it work out cheaper than a linode vps in this case?
This step-by-step-tut is not written for rails 3.2, is it?
The AMIs only work in the region they were created in. If you want to use us-west-1 with Ubuntu 12.04, the AMI you want is ami-e7712aa2.
Check out the sidebar on http://alestic.com/ to get a listing of Ubuntu AMIs by region and type.
The timezone setting is just the standard set of timezone mappings from Ubuntu. If you're on the west coast, I guess "America/Vancouver" would do what you want.
data-source for index action is
data-source="<%= products_url(format: "json")
how to code same for something like show action(member action) ??
Thanks, great cast, and just in time for me.
When I configure AMI for us-east-1 things seems to work. But if I change the aws: to region: eu-west-1 even the staging fails with a AMI ID '' does not exist. Any ideas how to solve this? Also what shall I specify for time zone instead of US/Eastern
Thank you Rees, Im a better man now that i can spell .. :)
Hi Ryan,
I am new to rails. In my application i integrate the paypal by following episode 146. In that i didn't get the order summary. For that what can i do??? Can u help me out. Thanks.
No its not. It seems you are confusing attr_accessible with attr_accessor.
Awesome episode. Thanks Ryan.
Is there a way to configure Chosen to support the inline create option?
I've a little question about Ruby: at 5:46, when Bates wrote
attr_accessible :author_tokens
,attr_reader :author_tokens
will be optional, right?Another excellent and very useful episode. Folks, there is a pattern here. When Ryan says, "Hold on to your seats." He is not kidding. That is when he is at his best :) Hey Ryan, please make a point of saying that every week in either the "Pro" or the "Revised" episodes :)
Best regards,
Bharat
Hey Ryan, how could we validate these virtual attributes? I can validate without any problems the id that these _name setters refer to, but I can't output the feedback on the form. How could I do that? Thank you.
+1
On 12.04, I ran into an error about the admin group not existing. All I had to do to fix it was run
groupadd admin
. The group is already listed in the sudoers file, it just wasn't created when the distro was installed.Thank you, just what i was looking for.
Is the uid returned remains the same when an user authenticates via omniauth (twitter,facebook etc)? Can I use it as an identifier/foreign key in another model where they are able to provide extra details such as their website? If uid is going to be dynamic (for instance every time they login), then is there a way to relate their extra details with their uid?
Very nice! Looking forward to the upcoming releases.
Hi!
Thanks thanks Ryan Bates for this Interesting cast.
Can I use a wicked wizard to another model than the User.
Thanks for any help
Bardach
In order for this to work you have to use the following syntax:
Not sure why this is the case. The preventDuplicates option is just to show for extra options that a comma is needed (but it is super useful).
Great episode, but shouldn't the token source be based on a path or url function like this?
Please note this is from a project that uses Mongoid and SimpleForm.
TokenInput seems great. It strikes me as a great solution for tags. Any comments on this?
'ilike' dosn't work for mysql.
MySql has an alternative: 'select * from foo where upper(bar) like upper(?)'.
preventDuplicates is really useful, thanks
Great episode Ryan, but i think is better to use:
ilike
instead of using:
like
To avoid problems with case sensitive strings.
And another tip for using TokenInput is to set the option of:
preventDuplicates: true
I do the following:
before_filter :clear_medicine_ids, only: [:create, :update]
def clear_medicine_ids
@medical_consultation.medicine_ids = [] unless params[:medical_consultation][:medicine_ids].present?
end
I am using Mongodb/mongoid with my Rails project. I followed the steps given. Most of things worked. But I am stuck at making mongo to work.
2 I suppose I should install Mongodb on Linode server and just keep it runing and pointing the production server to localhost in my mongoid.yml file. Does that sound right?
3 I wanted to make things generally working without setting up mongoid.yml correctly. But then because I have database.yml there with unused sqlite3 reference, cap deploy:cold gives error about sqlite3 not in the gemfile. I suppose if I remove config/database.yml altogether, it should not ask me to include sqlite3 any more?
These questions might be too specific to my situation. But any links to relevant information that can help me would be really appreciated.
Hey, you are missing when user did not select any item on the list, episode-258 / revised / bookstore-chosen-after.
Thanks a lot Ryan! This episode is just amazing! I was looking for a tutorial like this for months!
You'll get these for a bit. There's a delay between when Amazon indicates the machine is available and when we can actually SSH into it. If it doesn't resolve itself after a few minutes, then something is wrong. But if you only see them for a couple minutes, it's nothing to worry about. EC2 is pretty variable about instance startup time.
Rubber should handle this for you. By default, the current version of rubber (2.0.1) uses ami-3c994355, which corresponds to the 64-bit instance-store Ubuntu 12.04 LTS image.
Feel free to hop onto #rubberec2 on Freenode and I'll try to help out.
check out https://github.com/mon-ouie/pry-remote
use
binding.pry_remote
in your code, andand then from another terminal
pry-remote
to connectI used your previous snippet and modified it, This should help you out.
$("#article_project_tokens").tokenInput($("#article_project_tokens").data("token-source"), {
crossDomain: false,
prePopulate: $("#article_project_tokens").data("pre"),
theme: "piplanet",
preventDuplicates: true,
tokenLimit: 10,
queryParam: "query",
minChars: 4,
hintText: "Start typing a project's name..."
});
<%= f.input :project_tokens, label: false, input_html: {data: {token_source: search_project_names_path, pre: @article.projects.only(:id,:name).map(&:attributes).to_json}} %>
You'll probably have to change this, it was written in an app that uses Mongoid.
Once again, you read my mind with this week's episode topics! Thanks a ton Ryan, keep up the great work.