Anyone else have the issue where the session persists? I can load the mobile view normally with a mobile user-agent, and switch to Full Site once. After that, clicking the link or changing the param has no effect until I've cleared cache.
Just wondering if anybody else has tried this on mobile i.e. iPad. When I try to upload multiple files from iPad, let's say I select 3 pictures, it uploads the first picture 3 times.
I'm having trouble figuring out how to search substrings, or partial words from the search query. Any thoughts to this? Or perhaps you could make an elastic search part 3? :)
when i run with template "complete_passenger_nginx", it asked me which database with error. Just for information, i use RDS Amazon for MySQL service. so I choose "complete_passenger_nginx_mysql".
At here, rubber is generated successfully. My ec2 is installed on ubuntu 64bit and rbenv (not rvm). But I confuse, if autoscaling will use rbenv to control my passenger. Because i check in config/rubber/passenger.yml, it uses rvm not rbenv.
How i can make my rubber uses rbenv to control my ruby, rails and passenger, not rvm and native ruby? will it be problem when scaling is run, if i left rvm as default configuration for my passenger?
Really awesome but both rails_panel and better errors only support mac for editor integration? Sad, have linux users really become so rare that nobody cares?
Thanks Ryan for another excellent Railscast. I have seen several screencasts on the subject of search, and all of them limit the 'domain' of the search to just one 'entity'. This screencast searches Products. I need a search that finds anything on the, whether it be Products, or BlogPosts, or Orders or whatever. I can imagine one way to accomplish this - simply duplicate the effort here for Products, adding Orders alongside it, and then in the search results present a section for Products Found and another section for Orders Found. But isn't there a better way to accomplish this?
I love RailsPanel, however recently I discovered that it interacted poorly with rack-raw-upload, so I had to stop using it :( It's on my todo list to generate an isolated test case and report it, but I'm curious - has anybody else run across similar issues?
I resolved it by changing the server property in config/private_pub.yml from "localhost" to my dev server IP address.
You'll need to change it to something that your mobile device can access. Also, if you manually included the private_pub javascript using a javascript_include_tag with an absolute URL to localhost, you'll probably want to change it there as well.
I may be wrong, but I think the postgresql listen/notify will require polling, too. So that's not really an option for "instant push".
This gist of mine shows where you have to SELECT null in order to get the socket to send along any unprocessed notifications, at which point you can get all notifications available on the connection.
Hi Ryan,
What should I put it to add mongodb support ?
Do I need to fully install it with apt-get on the VM ?
Does it also require Port Forwarding ?
Thanks
hii,I'm khamar, I've a problem with solr sunspot search engine configuration at the production level. While performance of the search engine at developing level is good. but when it comes to production it is taking lot of time to execute the query results. I've server in rackspace with 512 ram. can anyone help me pls where i went wrong, and please let me know the required ram for 1lakh records at production.
fyi I just installed teaspoon, a new javascript runner for rails apps, looks really nice https://github.com/modeset/teaspoon Support asset pipeline, coffeescript, headless, and more.
That said, I'm currently running into a password validation bug, where I'm getting a undefined method `to_sym' for nil:NilClass in the lambda being called in the omniauth identity initializer in the event of a failed authentication. I'll be happy if and when I figure that out.
I'm personally excited for this, simply because the complexity of web sockets or comet always bothers me, whereas SSEs seem fairly straightforward. Its unfortunate that there are so many gotchas, but one could hope that, if not in the 4.0 release, a 4.0.1 or even a 4.1 would fix them
Because you should avoid premature optimization and premature refactoring. Maybe you'll need it, maybe you won't. In the former case, you can do it when you need it. In the latter case, you'll have wasted effort by doing premature work.
Thanks for the tutorial very interesting but I am not sure if its the correct usage. If you are going to define the fields in your code by defining accessors then you know what fields you want at code time. If you know what fields you want then why not just use db columns, they are easier to use. As far as I can see this is most useful when you dont know what fields you will have or they can change. What if you deploy this and later decide to change a field? I would rather query the keys in the properties column and use that to define my accessors, field forms and #show page etc. This means u can't rely on an accessor existing, but that feeds back into the same point. It does not seem wise to let the app define a schema in code but let the data remain schema-less in the DB. I think the app should not make any assumptions about what the data is. Whats the advantage of moving your schema into ruby?
I've just started Railes recently and I have a question about the datatable
I need to list the following
Username email role registered_at
The problem lies in role part cause when you click on the change role button it pops in HTML radio buttons to make you change the role
with datatable i need to retrive this json and customize to html each time i respond to the client side now i have the JSON in the row cell
My understanding is that calling singularize before classify is redundant and can lead to problems with singular forms that end with "s". See http://apidock.com/rails/ActiveSupport/Inflector/classify and http://apidock.com/rails/ActiveSupport/Inflector/camelize. To be safe, classify should only be called on a plural form. The camelize method can be called on either and will return a result with the same grammatical number (i.e. singular or plural). Of note, the source for classify (at least in 3.2.8) is:
Notice that if you don't want your users to be logged out from Facebook when logging out from your app you should change your javascript file to the following code. Any better solutions for that?
Anyone else have the issue where the session persists? I can load the mobile view normally with a mobile user-agent, and switch to Full Site once. After that, clicking the link or changing the param has no effect until I've cleared cache.
Do SSEs work on heroku. I ask because was looking into websockets on rails and heroku, but they don't support them.
Unfortunately, Ruby 2.0.0-rc1 does not work with binding_of_caller :(
How? It launches an external console, not better_errors. Also binding.pry only set up a breakpoint at the specific place.
How is it possible to extract hashtags via the twitter gem? I tried with:
def hashtags
@hashtags ||= entities(Twitter::Entity::Hashtag, :hashtags)
end
But it is on the view site I get in trouble! :s
Thanks Ryan,
Its long time, Please post a PRO screencast on spree coustmoization
cover both frontend and admin .
Just wondering if anybody else has tried this on mobile i.e. iPad. When I try to upload multiple files from iPad, let's say I select 3 pictures, it uploads the first picture 3 times.
any suggestions?
I'm having trouble figuring out how to search substrings, or partial words from the search query. Any thoughts to this? Or perhaps you could make an elastic search part 3? :)
Same here. I think that Linux-users are far more likely to tinker on their own. I found a solution (through my friends at google ;) ) which might be a solution, at least for Ubuntu: http://www.tkalin.com/blog_posts/using-console-vim-as-vim-protocol-handler-in-ubuntu
I'll give it a try, maybe lauchning gVim for that. YMMV, of course.
Hi, thank's for this great episode!
Any clue how to configure the external handler for Rubymine? Have been trying for a couple of hours without success...
what about Grape ?
getting it more interesting
I have few questions to rubber template:
when i run with template "complete_passenger_nginx", it asked me which database with error. Just for information, i use RDS Amazon for MySQL service. so I choose "complete_passenger_nginx_mysql".
At here, rubber is generated successfully. My ec2 is installed on ubuntu 64bit and rbenv (not rvm). But I confuse, if autoscaling will use rbenv to control my passenger. Because i check in config/rubber/passenger.yml, it uses rvm not rbenv.
How i can make my rubber uses rbenv to control my ruby, rails and passenger, not rvm and native ruby? will it be problem when scaling is run, if i left rvm as default configuration for my passenger?
Many Thanks,
Yacobus Reinhart
Upgrading to 3.2 was screwing other things up for me (I'm on Windows 7), so I just commented out the (START_DAY) arguments in the weeks method.
As long as I don't need to manually set the start of the week, that should be fine for now.
If you're a
pry
user, you can runbinding.pry
in the better_errors console and it will pop up in yourrails server
Really awesome but both rails_panel and better errors only support mac for editor integration? Sad, have linux users really become so rare that nobody cares?
How are people solving upon login failure the URL changes to /sessions/ from the original /sessions/new/ ???
Look into Yahoo Pipes
For GNU Emacs users:
and install this: https://github.com/typester/emacs-handler
Thanks Ryan for another excellent Railscast. I have seen several screencasts on the subject of search, and all of them limit the 'domain' of the search to just one 'entity'. This screencast searches Products. I need a search that finds anything on the, whether it be Products, or BlogPosts, or Orders or whatever. I can imagine one way to accomplish this - simply duplicate the effort here for Products, adding Orders alongside it, and then in the search results present a section for Products Found and another section for Orders Found. But isn't there a better way to accomplish this?
I love RailsPanel, however recently I discovered that it interacted poorly with rack-raw-upload, so I had to stop using it :( It's on my todo list to generate an isolated test case and report it, but I'm curious - has anybody else run across similar issues?
I used rabl in my app. how can I avoid creating controllers which is essentially same as my non-API controllers
so how you're to do?? please tell me
I resolved it by changing the server property in config/private_pub.yml from "localhost" to my dev server IP address.
You'll need to change it to something that your mobile device can access. Also, if you manually included the private_pub javascript using a javascript_include_tag with an absolute URL to localhost, you'll probably want to change it there as well.
I had to restart the app to make this work.
I may be wrong, but I think the postgresql listen/notify will require polling, too. So that's not really an option for "instant push".
This gist of mine shows where you have to SELECT null in order to get the socket to send along any unprocessed notifications, at which point you can get all notifications available on the connection.
https://gist.github.com/3915671#file-reel_ws_pg_example-rb-L21
Also, Tony Arcieri's reel is an excellent alternative in many respects to using live.
Hi Ryan,
What should I put it to add mongodb support ?
Do I need to fully install it with apt-get on the VM ?
Does it also require Port Forwarding ?
Thanks
And remember to test if key 'email' exist because twitter don't share that information...
I'd recommend using assert_difference instead:
hmm..I have same problem 'Validation failed: Password can't be blank, Password is too short (minimum is 6 characters)'
'app/models/user.rb:64:in
send_password_reset'
create'app/controllers/password_resets_controller.rb:9:in
hii,I'm khamar, I've a problem with solr sunspot search engine configuration at the production level. While performance of the search engine at developing level is good. but when it comes to production it is taking lot of time to execute the query results. I've server in rackspace with 512 ram. can anyone help me pls where i went wrong, and please let me know the required ram for 1lakh records at production.
Thanks in advance...
fyi I just installed teaspoon, a new javascript runner for rails apps, looks really nice https://github.com/modeset/teaspoon Support asset pipeline, coffeescript, headless, and more.
Sorry, I hadn't come back to look as I had found some solutions. There is another omniauth rails cast, pre-identity.
I actually ended up going the user as identity route, as multi-authentication with identity seems to cause problems. I followed this page as well for assistance: http://bernardi.me/2012/09/using-multiple-omniauth-providers-with-omniauth-identity-on-the-main-user-model/
That said, I'm currently running into a password validation bug, where I'm getting a undefined method `to_sym' for nil:NilClass in the lambda being called in the omniauth identity initializer in the event of a failed authentication. I'll be happy if and when I figure that out.
How do I reverse the order of a dropdown list in my search form:
I am using:
<%= f.select :project_id_eq, options_from_collection_for_select(Project.all, "id", "name", @search.project_id_eq) %>
I'm personally excited for this, simply because the complexity of web sockets or comet always bothers me, whereas SSEs seem fairly straightforward. Its unfortunate that there are so many gotchas, but one could hope that, if not in the 4.0 release, a 4.0.1 or even a 4.1 would fix them
Thank you!! I don't understand why this is causing this problem though. I've commented this line, and it seems to work, but doesn't this line tell Rails where to find other non-compiled assets that should be served statically? What is the right way to configure this? I've posted on StackOverflow as well: http://stackoverflow.com/questions/14506997/why-is-the-asset-pipeline-re-compiling-compiled-assets-creating-redundantly-nes
I am not sure why this is happening but .xls is showing up in the browser window and not downloading.
+1
It might be worth checking out: http://www.pubnub.com/
I love the "theme" song :)
Because you should avoid premature optimization and premature refactoring. Maybe you'll need it, maybe you won't. In the former case, you can do it when you need it. In the latter case, you'll have wasted effort by doing premature work.
Thanks for the tutorial very interesting but I am not sure if its the correct usage. If you are going to define the fields in your code by defining accessors then you know what fields you want at code time. If you know what fields you want then why not just use db columns, they are easier to use. As far as I can see this is most useful when you dont know what fields you will have or they can change. What if you deploy this and later decide to change a field? I would rather query the keys in the properties column and use that to define my accessors, field forms and #show page etc. This means u can't rely on an accessor existing, but that feeds back into the same point. It does not seem wise to let the app define a schema in code but let the data remain schema-less in the DB. I think the app should not make any assumptions about what the data is. Whats the advantage of moving your schema into ruby?
I had the same problem. Found the solution here:
http://ubuntuforums.org/showthread.php?t=1396862
Uninstalled postgresql-common and reinstalled postgresql and libpq-dev
apt-get purge postgresql-common postgresql libpq-dev
apt-get install postgresql libpq-dev
If you are using coffeescript then use:
Great screencast, thanks Ryan!
One problem I'm having (perhaps someone here has had similar?) is that my tests run twice, using the provided Rake task.
Basically, my model tests run, then my helper tests, and then ALL my tests (duplicating the aforementioned model and helper tests).
Anyone know what's up? I'm by no means a Rake guru...
Can you make a video tutorial for the new setup of Thinking sphinx.
Hey this is Mina Koltaa
I've just started Railes recently and I have a question about the datatable
I need to list the following
Username email role registered_at
The problem lies in role part cause when you click on the change role button it pops in HTML radio buttons to make you change the role
with datatable i need to retrive this json and customize to html each time i respond to the client side now i have the JSON in the row cell
can anyone help ???!!
Anyone else having any issues similar to this after updating to 'jquery-rails 2.2.0'?
Uncaught Error: Syntax error, unrecognized expression: div class="upload"
img006.jpg
div class="progress"><div class="bar" style="width: 0%"...
prawn already support utf-8,just import your font file.
I tried this, but it doesn't specify WHERE the .env file needs to be saved. A little help would be appreciated. Thanks.
My understanding is that calling
singularize
beforeclassify
is redundant and can lead to problems with singular forms that end with "s". See http://apidock.com/rails/ActiveSupport/Inflector/classify and http://apidock.com/rails/ActiveSupport/Inflector/camelize. To be safe,classify
should only be called on a plural form. Thecamelize
method can be called on either and will return a result with the same grammatical number (i.e. singular or plural). Of note, the source forclassify
(at least in 3.2.8) is:Repeated calls to
singularize
are not necessarily safe:Turns out the issue was really with irb:
https://github.com/zdavatz/spreadsheet/issues/8
Seems to work fine from scripts.
Notice that if you don't want your users to be logged out from Facebook when logging out from your app you should change your javascript file to the following code. Any better solutions for that?
PS: I'm doing it just because I find it annoying to logout users from Facebook without asking them to do so.