我在OSX Lion下让rvm重新工作时遇到了很多问题.不出所料,它似乎是readline的一个问题,这在几个地方都有提到.
但是,(这是一个更新)似乎readline本身没有正确安装!
这是我到目前为止所尝试的:
重新安装xcode(4.1)(我还首先删除了Developer文件夹.)
根据http://trac.macports.org/wiki/Migration清理并重新安装我的所有端口
按照以下步骤重新安装readline:https://rvm.beginrescueend.com/packages/readline/
使用该特定的readline版本:
rvm install 1.9.2 --with-readline-dir=$rvm_path/usr
Run Code Online (Sandbox Code Playgroud)
我也完全重新安装了rvm.仍然没有去.这是我看到的当前错误:
ERROR: Error running 'make ', please read /Users/tristankromer/.rvm/log/ruby-1.9.2-p290/make.log
ERROR: There has been an error while running make. Halting the installation.
Run Code Online (Sandbox Code Playgroud)
...以及随附的日志文件.
make[1]: Entering directory `/Users/tristankromer/.rvm/src/ruby-1.9.2-p290/ext/readline'
/usr/bin/gcc-4.2 -I. -I../../.ext/include/x86_64-darwin11.0.0 -I../.././include -I../.././ext/readline -DRUBY_EXTCONF_H=\"extconf.h\" -I/Users/tristankromer/.rvm/usr/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wshorten-64-to-32 -Wno-long-long -fno-common -pipe -o readline.o -c readline.c
readline.c: In function ‘username_completion_proc_call’:
readline.c:1386: error: ‘username_completion_function’ undeclared (first use in …Run Code Online (Sandbox Code Playgroud) 我已完成以下步骤:
添加到gemfile:
gem "recaptcha"
Run Code Online (Sandbox Code Playgroud)
添加到config/initializers/recaptcha.rb
Recaptcha.configure do |config|
config.public_key = 'MyKeyHere'
config.private_key = 'MyKeyHere'
end
Run Code Online (Sandbox Code Playgroud)
添加查看:
= raw recaptcha_tags
Run Code Online (Sandbox Code Playgroud)
Ran:捆绑安装
...然后重新启动服务器.结果?
undefined local variable or method `recaptcha_tags' for #<#<Class:0x1053baaa0>:0x1053b69c8>
Run Code Online (Sandbox Code Playgroud) 我正在使用RubyMine告诉我
unsubscribe_from_all_notifications
Run Code Online (Sandbox Code Playgroud)
...对于方法名称来说太长了.什么是最大长度?
我想将电子邮件存储在一个单独的表中,并允许用户保存多封电子邮件并使用其中任何一封电子邮件登录.我还想将密码存储在另一个表中.
如何配置Devise以在其他地方存储身份验证信息?
最糟糕的情况是,如果我不得不入侵它,是否有一个生成器只是将所有内容移植到应用程序?我注意到有一个视图生成器.
谢谢.
也许是初学者问题:
我正试图通过考拉来检查我的用户权限.在某些情况下,我会被抛出错误.所以我只想抓住它并重定向以重新进行身份验证.
def check_facebook_permissions
if token = current_user.try(:authentications).find_by_provider('facebook').try(:token)
graph = Koala::Facebook::API.new(token)
permissions = graph.get_connections('me','permissions')
session[:facebook] = {}
session[:facebook][:ask_publish_actions] = true if permissions[0]['publish_actions'] != true && permissions[0]['publish_stream'] != true
end
rescue_from Koala::Facebook::APIError
# Do something funky here
end
Run Code Online (Sandbox Code Playgroud)
我觉得这很简单,但我从来没有打过我的救援.相反,我得到:
Koala::Facebook::APIError (OAuthException: Error validating access token: Session has expired at unix time 1324026000. The current unix time is 1324352685.):
Run Code Online (Sandbox Code Playgroud)
我在这里错过了什么?
ruby exception-handling facebook-graph-api ruby-on-rails-3 koala
我没有看到在哪里配置这些.我假设我应该创建某种初始化文件.有帮助吗?
我不相信它是相关的,但我正在使用omniauth进行身份验证,并且结果很好.
我的Rails控制台停止工作:
$ rails c
Could not find rake-10.2.2 in any of the sources
Run `bundle install` to install missing gems.
Run Code Online (Sandbox Code Playgroud)
你认为跑步bundle install或bundle update工作,但不是!令我感到困惑的是,我没有使用rake 10.2.2而且它不在gemfile.lock中.我正在使用rake 10.3.2
Running via bundle exec rails console RAILS_ENV=development返回相同的错误.
尝试gem install rake -v 10.2.2只是温和地改善了这种情况.现在它正在寻找一个我不使用的不同宝石:
$ rails c
Could not find i18n-0.6.9 in any of the sources
Run `bundle install` to install missing gems.
Run Code Online (Sandbox Code Playgroud)
再次......捆绑安装就好了.Odder仍然,rails s工作正常,耙任务很好.我只是不能使用控制台!
$ bundle install
Using rake 10.3.2
Using i18n 0.6.11
Using json 1.8.1
Using …Run Code Online (Sandbox Code Playgroud)