If u want email confirmation when users sign up, add the option confirmable in the model User.rb. also in the migration uncomment the lines corresponding to confirmable.
Add the lines
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:enable_starttls_auto => true,
:address => "smtp.gmail.com",
:port => 587,
:domain => "mydomain.com",
:authentication => :login,
:user_name => "myemaiL@mydomain.com",
:password => "mypass"
}
to config/environments/development.rb
If u want email confirmation when users sign up, add the option confirmable in the model User.rb. also in the migration uncomment the lines corresponding to confirmable.
Add the lines
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:enable_starttls_auto => true,
:address => "smtp.gmail.com",
:port => 587,
:domain => "mydomain.com",
:authentication => :login,
:user_name => "myemaiL@mydomain.com",
:password => "mypass"
}
to config/environments/development.rb
put the below file 'import.rake' in lib/tasks
then 'rake import_hosts'
require 'csv'
task :import_hosts =>[:environment] do
file="db/tmp/hostssmall.csv"
additional_rows_to_skip = 1
CSV.foreach(file) do |row|
if additional_rows_to_skip > 0
additional_rows_to_skip-=1
else
p = Host.create!({
:ref => row[0],
:name => row[1],
:address => row[2],
}
)
end
end
end
http://ericlondon.com/posts/246-importing-and-converting-csv-data-into-a-rails-model-with-a-slick-active-admin-interface
This does not work in my system: Ubuntu 10.04, Rails 3.2.11
But this worked:
rails new store
spree install store -A
cd store
rails s
Next the address http://localhost:3000
will give u the spree web page.
login with spree@example.com
password : spree123
u will get the admin screen.
Refer the website:
http://checkedexception.blogspot.ie/2012/05/installing-spree-from-scratch-on-ubuntu.html
rails g spree:install
Note that link_to signout should contain :method=>delete
as shown below:
/app/views/layouts/application.html.erb
<% if user_signed_in? %>
Signed in as <%= current_user.email %>. Not you?
<%= link_to "Sign out", destroy_user_session_path, :method => :delete %>
<% else %>
<%= link_to "Sign up", new_user_registration_path %> or
<%= link_to "Sign in", new_user_session_path %>
<% end %>
include in your gemfile
gem 'omniauth-twitter'
rails g migration add_rpx_to_users rpx_identifier:string
gives an error. It says that there is no such file to load.
Nice
This episode will not work in the current Rails 3.2.11 and devise 2.2.3. (January2013). So see the video in the following link. It works correctly.
http://www.slideshare.net/wleeper/devise-and-rails
Also run 'rake db:migrate' in the terminal.