devise

Bundle Exec Rake DB Migrate

这一生的挚爱 提交于 2020-01-06 13:53:39
问题 I have been getting this error when I run bundle exec rake db:migrate for a basic RoR website. I am a beginner and found similar errors on this site and Treehouse but nothing with the specific second half of this error (from the NOT NULLC onward). I am still not sure how to resolve this - can anyone advise? I am running this on windows. SQLite3::SQLException: duplicate column name: email: ALTER TABLE "users" ADD "em ail" varchar(255) DEFAULT '' NOT NULLC:/Sites/code/omrails-master/db/migrate

Trying to install gem devise

倾然丶 夕夏残阳落幕 提交于 2020-01-06 10:24:59
问题 I am having a problem adding the gem file: gem 'devise' . When I add it to sublime and then go to the terminal and do bundle install , I get an error. This is what I get: Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. An error occured while installing bcrypt (3.1.7), and Bundler cannot continue. Make sure that `gem install bcrypt -v '3.1.7'` succeeds before bundling. (I have no idea what this means) I am working on the One Month Rails course following the

How to pass extra params inside option hash in confirmation email in Rails?

寵の児 提交于 2020-01-06 09:57:24
问题 I am trying to pass extra params inside the options{} hash in the confirmation email but It is just showing me subject and from headers in the mailer. This is my code CustomMailer.confirmation_instructions(user,token, {custom_param: "abc"}) When I show opts data inside template like this @first_name = opts It shows {:subject=>"Email Confirmation", :from=>"no-reply@sample.com"} custom mailer code is class CustomMailer < Devise::Mailer helper :application # gives access to all helpers defined

How to pass extra params inside option hash in confirmation email in Rails?

霸气de小男生 提交于 2020-01-06 09:55:29
问题 I am trying to pass extra params inside the options{} hash in the confirmation email but It is just showing me subject and from headers in the mailer. This is my code CustomMailer.confirmation_instructions(user,token, {custom_param: "abc"}) When I show opts data inside template like this @first_name = opts It shows {:subject=>"Email Confirmation", :from=>"no-reply@sample.com"} custom mailer code is class CustomMailer < Devise::Mailer helper :application # gives access to all helpers defined

Resque and Resque_mailer with Devise

拈花ヽ惹草 提交于 2020-01-06 07:53:07
问题 I am implementing background email processing with Resque using the resque_mailer gem (https://github.com/zapnap/resque_mailer). I was able to get it to work for all my emails except the ones sent by Devise. I went through a bunch of SO questions, and blog posts (for instance http://teeparham.posterous.com/send-devise-emails-with-resque) but could not find a way to get it to work. What are the precise steps to follow to get resque_mailer to work with Devise? 回答1: I'd take a look at devise

Actioncable authentication with multiple Devise models

走远了吗. 提交于 2020-01-06 06:48:28
问题 I am currently implementing a chat between 2 of my Devise models. Client and Professionnel . It is working just fine at the moment but I have only one channel: every Client or Professionnel receive all messages from all clients and all professionals. The displaying is fine but someone who watches their AJAX flow can see every private message that is not meant for them.. As per this thread http://www.thegreatcodeadventure.com/rails-5-action-cable-with-multiple-chatroom-subscriptions/ this is

Actioncable authentication with multiple Devise models

半城伤御伤魂 提交于 2020-01-06 06:48:14
问题 I am currently implementing a chat between 2 of my Devise models. Client and Professionnel . It is working just fine at the moment but I have only one channel: every Client or Professionnel receive all messages from all clients and all professionals. The displaying is fine but someone who watches their AJAX flow can see every private message that is not meant for them.. As per this thread http://www.thegreatcodeadventure.com/rails-5-action-cable-with-multiple-chatroom-subscriptions/ this is

Error with Rake DB:Migrate undefined method `confirm_within=' for Devise:Module

杀马特。学长 韩版系。学妹 提交于 2020-01-06 04:58:26
问题 I'm getting this error when I try run DB:Rake : ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment Resolved collector.newrelic.com to 204.93.223.153 rake aborted! undefined method `confirm_within=' for Devise:Module /Users/jasonvdm/development/rails/config/initializers/devise.rb:66:in `block in <top (required)>' /Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194@wheelz/gems/devise-2.1.2/lib/devise.rb:247:in `setup' /Users/jasonvdm/development/rails/config

Error with Rake DB:Migrate undefined method `confirm_within=' for Devise:Module

倾然丶 夕夏残阳落幕 提交于 2020-01-06 04:58:06
问题 I'm getting this error when I try run DB:Rake : ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment Resolved collector.newrelic.com to 204.93.223.153 rake aborted! undefined method `confirm_within=' for Devise:Module /Users/jasonvdm/development/rails/config/initializers/devise.rb:66:in `block in <top (required)>' /Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194@wheelz/gems/devise-2.1.2/lib/devise.rb:247:in `setup' /Users/jasonvdm/development/rails/config

Twitter::Error::Forbidden - Unable to verify your credentials

梦想与她 提交于 2020-01-06 04:35:11
问题 I'm using devise + omniauth and I can connect to twitter api correctly. But when I try to use twitter gem, I have the following error in console : "Twitter::Error::Forbidden - Unable to verify your credentials" I have installed the gem and created an initializer at config/initializers/twitter.rb Twitter.configure do |config| config.consumer_key = PKe41... config.consumer_secret = qETY..... end And I'm trying into a controller : def twitter @twitter_home_timeline = Twitter.home_timeline end