小编she*_*tal的帖子

设计..首次登录后应要求更改密码

我在我的应用程序中使用devise作为身份验证.

我需要在设计中实现功能.首次登录后,用户应要求更改密码.

我试过模型

 after_create :update_pass_change

    def update_pass_change
     self.pass_change = true
     self.save
    end 
Run Code Online (Sandbox Code Playgroud)

ruby-on-rails ruby-on-rails-3 ruby-on-rails-3.1 ruby-on-rails-3.2 ruby-on-rails-4

3
推荐指数
1
解决办法
2771
查看次数

gem install ruby​​-odbc -v'0.99995'无法在ubuntu 11.10上安装

我在安装gem ruby​​-odbc -v'0.99995'时没有收到错误.请帮我解决这个错误.我尝试了很多东西,但没有奏效.

Building native extensions.  This could take a while...
ERROR:  Error installing ruby-odbc:
    ERROR: Failed to build gem native extension.

/home/sheetal/.rvm/rubies/ruby-1.8.7-p371/bin/ruby extconf.rb
checking for version.h... yes
checking for sql.h... no
*** 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.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/home/sheetal/.rvm/rubies/ruby-1.8.7-p371/bin/ruby
    --with-odbc-dir
    --without-odbc-dir
    --with-odbc-include …
Run Code Online (Sandbox Code Playgroud)

ruby rubygems ruby-on-rails ruby-on-rails-3 ruby-on-rails-3.1

1
推荐指数
2
解决办法
2649
查看次数