I have the same problem I found out that ZSH (and oh-my-zsh) works in windows under cygwin which emulates a *nix environment. It's a little bit slower, and i had some quirks buts its worth a try.
I'm using this, and wondering how you can tell the difference between a new registration and a login, since they both hit the same callback URL. I'd like to collect some metrics on sign-ups, but I'm not sure how I would be able to tell in the rails app.
Has anybody gotten this to work with 1.9.3? There is the missing "authenticate" method error only with 1.9.3, and not with 1.9.2. I verified this by using the same app on both rubies.
This is the first time I've ever seen "caching" implemented by storing something in Thread.current...is this somewhat of a standard practice? Anyone have any links to more explanation of this technique?
I am getting stuck on the same issue. I implemented identity just fine in a new app I am working on.. however, when I try and bake in the reset password functionality from the other video that covers that concept it does not work.
It seems that simply updating the password attributes on the identity model does not work.
Has anyone done this successfully? Mind sharing the solution you came up with?
I've been using foreman for a while now to scale my various ruby processes in a centralized manner, and it is working perfectly for me .
Anyways I would like to have some feature to restart a process or even to give it more control like to kill a single process and start it again, in the current implementation when I kill one process the whole processes in the main foreman stops . any workaround or solution here ? thanks in advance
Shells (like zsh) are a system-wide thing, so I don't think the terminal client you choose should matter. I setup zsh once and it run the same way in both Terminal and Coda, so I would be pretty surprised if it didn't also run in any other terminal client (iTerm2).
Check your PATH (export PATH) in .zshrc and remove all references to .rvm within it. You should end up with something like this export PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/texbin
When installing oh-my-zsh it will look at your current PATH and fill your .zshrc with it, which also pulls .rvm environment. And you won't want that there since rvm should be handling it.
How do you get the delete key to work on a Macbook pro? The default key binding sends something other than delete. Adding bindkey "^[[3~" delete-char to a custom config file doesn't do it.
Edit: The delete key seems to be deleting one character at a time as it should, but the cursor moves forward when it is hit--very confusing. Am I the only one seeing this?
Edit: Okay, so declaring my terminal as 'vt100' instead of 'xterm-color' as it was before appears to fix the delete cursor issue along with a couple of other oddities.
In sphinx, delta indexing acts like a secondary index where you can index a smaller number of documents (such as new documents added today) and your site will search the main + delta index. You need to merge the delta index with the main index frequently (once a day or once a week at least) by using a cron job or other periodically running task. Also, the delta index doesn't imply real-time indexing either, you still have to periodically update the delta index as well. It's not real time. Last time I used sphinx about a year ago, they were experimenting with an update API where you can just update the document in the index, which would be real time.
For the people commenting about oh-my-zsh vs. vanilla zsh, I highly recommend Thoughtbot'sdotfiles scripts, sets up a very nice zsh environment as well as an awesome .vimrc + vim plugins.
@rbates
Is the "rbates.zsh-theme" shown in this screencast the theme you use in virtually all of your screencasts? If not, please show us "the original - the one and only rbates zsh-theme".
Yes, just run rvm --default use 1.9.2 once. I think the rvm 1.9.2 line in my script just remained because I had troubles setting the default ruby version some time ago.
If nothing is running when I open a new tab (cmd + t) from ZSH, it is in the directory of the previous tab. However, if my rails server is running and I open a new tab, it defaults to my home directory. Any suggestions on how to get consistent behaviour? I would prefer to always have the previous tabs location.
I've wanted to implement this for some time now but had a few questions:
1) Should the URL change? i.e. /?page=2
2) What happens when you click a product then click back, are all the same products still loaded? I have seen this problem with a couple websites that use Endless Page.
"Sphinx and Solr both index documents periodically (with a large delay or manual re-index by default) so it's more difficult to index documents near real time. ElasticSearch has a default delay of one second."
Sphinx has a feature called "delta indexing" which provides real-time updates to the index. So Sphinx doesn't have to rely on periodic updates.
As an FYI, I use ZSH in windows with cygwin just fine. It's definitely slower than under *nix, but it works and makes windows development much more... possible. You'll need to use the manual install method, however.
Fair point, but I think that cost is worth it for the ease of transition.
Once one starts to get their feet wet and become curious about separating Oh My ZSH from ZSH they can browse the ~/.oh-my-zsh/lib directory and it's quite easy to see all that it is configured.
Thanks for re-introducing ZSH to me, Ryan. I used to use zsh but got lazy when I switched to a new machine. On bash, I used bash_it for adding zsh like capabilities to bash. One of the plugins I really liked is z-zsh (https://github.com/sjl/z-zsh). I just added it to my custom set of plugins.
I don't care for this feature as much. It's a bit too greedy. Primarily because every time I try to do autocompletion it will try to use the directories there.
I don't see any references to %p in man zshmisc and it doesn't seem like anything is being displayed there on any of my prompts... Anyway, just a curiosity.
The reason is that your .bash_profile is no longer loaded with zsh. Put these two lines at the end of .zshrc and it will work again (of course you need to adapt the path to your home dir and the desired ruby version):
if [[ -s "/Users/Clemens/.rvm/scripts/rvm" ]] ; then source "/Users/Clemens/.rvm/scripts/rvm" ; fi
rvm 1.9.2
I have the same problem I found out that ZSH (and oh-my-zsh) works in windows under cygwin which emulates a *nix environment. It's a little bit slower, and i had some quirks buts its worth a try.
That's true, cd doesn't handle autocompletion in cdpaths.
Anyways, I use omz for looking up interesting solutions. I like to keep my shell environment small.
I'm using this, and wondering how you can tell the difference between a new registration and a login, since they both hit the same callback URL. I'd like to collect some metrics on sign-ups, but I'm not sure how I would be able to tell in the rails app.
I read it that way myself at first. Try it out. Better yet, write a rspec test. :)
Has anybody gotten this to work with 1.9.3? There is the missing "authenticate" method error only with 1.9.3, and not with 1.9.2. I verified this by using the same app on both rubies.
It seems that the issue with "authenticate" is particular to ruby 1.9.3. I tried with Ruby 1.9.2, and I don't see any issues.
I find it useful when you mention books to look at if someone wanted to dig deeper into the subject. Please continue doing that. Thanks Ryan!
This is the first time I've ever seen "caching" implemented by storing something in Thread.current...is this somewhat of a standard practice? Anyone have any links to more explanation of this technique?
Warden + Cancan + namespaces anyone?
Anyone having issues with rspec/cucumber no longer printing out colors after zsh install?
Looks like this tutorial was done with Sorcery v0.6.0 or round abouts, which uses the syntax Ryan used.
https://github.com/NoamB/sorcery/tree/v0.6.0
The newer versions (0.7.x) are using sorcery:install.
I am getting stuck on the same issue. I implemented identity just fine in a new app I am working on.. however, when I try and bake in the reset password functionality from the other video that covers that concept it does not work.
It seems that simply updating the password attributes on the identity model does not work.
Has anyone done this successfully? Mind sharing the solution you came up with?
Thanks for this great screencast. I have just implemented this into an application with omniauth identity.. However it seems
elsif @identity.update_attributes(params[:identity])
does not seem to change the password as it would if I were using roll-your-own authentication.
Where am I going wrong. I am still quite new to rails so any suggestions would be a big help
Thanks!
Oops i ment target.class.name
Thanks for sharing this, particularily the rake completion part. Any plans for pushing this back to the upstream maybe?
I've been using foreman for a while now to scale my various ruby processes in a centralized manner, and it is working perfectly for me .
Anyways I would like to have some feature to restart a process or even to give it more control like to kill a single process and start it again, in the current implementation when I kill one process the whole processes in the main foreman stops . any workaround or solution here ? thanks in advance
As I am stuck on windows 7 for a lot of reasons, I feel a bit left out this week.
You can also use this following line to make the error messages more personal..
And if you are unhappy with your model name you can always add an i18n translation to the model name!
The custom/plugins/rbates/rbates.plugin.zsh file is required, ok if it's empty.
Might want
setopt cshnullglob nullglob
in your .zshrc as well to avoid wildcard errors bombing the script.The User.authenticate method will not exist in Rails 3.1.3. I have posted a question here: http://stackoverflow.com/questions/8585104/method-authenticate-misssing-from-user-model-using-secure-password
The workaround that I used is to call
get_logged_in_user(password)
Anybody know more about this issue?
Got it - 'data-skip-pjax' => true
Apropos my post above, it seems twitter have changed their data structure, so it was getting a null. Try this:
Shells (like zsh) are a system-wide thing, so I don't think the terminal client you choose should matter. I setup zsh once and it run the same way in both Terminal and Coda, so I would be pretty surprised if it didn't also run in any other terminal client (iTerm2).
Check your PATH (export PATH) in .zshrc and remove all references to .rvm within it. You should end up with something like this export PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/texbin
When installing oh-my-zsh it will look at your current PATH and fill your .zshrc with it, which also pulls .rvm environment. And you won't want that there since rvm should be handling it.
How do you get the delete key to work on a Macbook pro? The default key binding sends something other than delete. Adding bindkey "^[[3~" delete-char to a custom config file doesn't do it.
Edit: The delete key seems to be deleting one character at a time as it should, but the cursor moves forward when it is hit--very confusing. Am I the only one seeing this?
Edit: Okay, so declaring my terminal as 'vt100' instead of 'xterm-color' as it was before appears to fix the delete cursor issue along with a couple of other oddities.
+1 ;)
HashRocket 4-eva.
Does this install zsh for iTerm2? Or will this only work for Terminal users?
@Jarron,
In sphinx, delta indexing acts like a secondary index where you can index a smaller number of documents (such as new documents added today) and your site will search the main + delta index. You need to merge the delta index with the main index frequently (once a day or once a week at least) by using a cron job or other periodically running task. Also, the delta index doesn't imply real-time indexing either, you still have to periodically update the delta index as well. It's not real time. Last time I used sphinx about a year ago, they were experimenting with an update API where you can just update the document in the index, which would be real time.
I'm using pjax_rails. How do I call a particular link in a non-pjax mode?
This worked once, but now whenever I try it, I get:
I think this is because Twitter only lets the app do something once (add itself?) and it is trying to do it again.
Does anyone know how to fix this?
Thanks!
Thanks Ryan, another great Railscast.
For the people commenting about oh-my-zsh vs. vanilla zsh, I highly recommend Thoughtbot's dotfiles scripts, sets up a very nice zsh environment as well as an awesome .vimrc + vim plugins.
Hi Ryan, How can we use this gem if our domain is on HTTPS? And how to use the ruby client available with the GEM, not using Net::HTTP.
@rbates
Is the "rbates.zsh-theme" shown in this screencast the theme you use in virtually all of your screencasts? If not, please show us "the original - the one and only rbates zsh-theme".
Thank you :)
Yes, just run
rvm --default use 1.9.2
once. I think thervm 1.9.2
line in my script just remained because I had troubles setting the default ruby version some time ago.Yep, figured that one out yesterday. Thanks anyway! Any chance to not include the ruby version in the file and to let rvm handle the versioning?
If nothing is running when I open a new tab (cmd + t) from ZSH, it is in the directory of the previous tab. However, if my rails server is running and I open a new tab, it defaults to my home directory. Any suggestions on how to get consistent behaviour? I would prefer to always have the previous tabs location.
ts-delayed-delta (https://github.com/freelancing-god/ts-delayed-delta) can also be set up to update indexes on the fly with DelayedJob.
I've wanted to implement this for some time now but had a few questions:
1) Should the URL change? i.e. /?page=2
2) What happens when you click a product then click back, are all the same products still loaded? I have seen this problem with a couple websites that use Endless Page.
Thanks
The main problem - how can i give a link to a some comment?
I really like how easy it is to add highlighting to my prompt. Incase anyone is interested in some basic color configuration look at my gist.
"Sphinx and Solr both index documents periodically (with a large delay or manual re-index by default) so it's more difficult to index documents near real time. ElasticSearch has a default delay of one second."
Sphinx has a feature called "delta indexing" which provides real-time updates to the index. So Sphinx doesn't have to rely on periodic updates.
As an FYI, I use ZSH in windows with cygwin just fine. It's definitely slower than under *nix, but it works and makes windows development much more... possible. You'll need to use the manual install method, however.
Hey Ryan nice episode but i have couple of questions.
First, is Faye a nice push server to use when there are thousands of requests coming at a time? Can it support 100,000 concurrent users like APE?
Secondly, if the answer is yes, please tell me the way to configure it as by default it can handle 1024 concurrent users.
You'll need at least Devise 1.5 to work with OmniAuth 1.0+
Fair point, but I think that cost is worth it for the ease of transition.
Once one starts to get their feet wet and become curious about separating Oh My ZSH from ZSH they can browse the
~/.oh-my-zsh/lib
directory and it's quite easy to see all that it is configured.Thanks for re-introducing ZSH to me, Ryan. I used to use zsh but got lazy when I switched to a new machine. On bash, I used bash_it for adding zsh like capabilities to bash. One of the plugins I really liked is z-zsh (https://github.com/sjl/z-zsh). I just added it to my custom set of plugins.
I don't care for this feature as much. It's a bit too greedy. Primarily because every time I try to do autocompletion it will try to use the directories there.
thx for this episode - I'm leaving bash for greener pastures.
Question: Anyone know what the
%p
escape is doing in the default prompt? Here's the whole thing:I don't see any references to
%p
inman zshmisc
and it doesn't seem like anything is being displayed there on any of my prompts... Anyway, just a curiosity.OH MY! It has broken my rvm differently from 4ware's report.
upon opening a shell, if I try to access a gemset like I usually do:
rvm @myapp
I get the following:Has this happened to anyone else?
Thanks!
The reason is that your
.bash_profile
is no longer loaded with zsh. Put these two lines at the end of.zshrc
and it will work again (of course you need to adapt the path to your home dir and the desired ruby version):More solutions on rails-troubles.com ;)