Search Results

Search found 332 results on 14 pages for 'heroku'.

Page 5/14 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Scheduling a Delay Job on Heroku with a Worker Dyno

    - by user1524775
    I'm currently using Heroku's scheduler to run a script. However, the time that the script takes to run is going to increase from a few milliseconds to a few minutes. I'm looking at using the delayed_job gem to push this process off to a Worker Dyno. I want to continue to run this script once-a-day, just offload it to the worker. My current rake task is: desc "This task updates some stuff for you." task :update_some_stuff => :environment do puts "Updating some stuff ..." SomeClass.new.process puts "... done." end Once the gem is installed, migration run, and worker dyno started, will the script just need to change to: desc "This task updates some stuff for you." task :update_some_stuff => :environment do puts "Updating some stuff ..." SomeClass.new.delay.process puts "... done." end With this task still being a rake task scheduled by Heroku's Scheduler, is the only thing that needs to happen here the introduction of the delay method to put this in the Worker's queue? Thanks in advance for any help.

    Read the article

  • Heroku- Could not find paperclip-3.1.3 in any of the sources

    - by otchkcom
    This morning when I tried to update my website, heroku didn't let me push the app. Here's the message I got. Fetching gem metadata from http://rubygems.org/....... Fetching gem metadata from http://rubygems.org/.. Fetching git://github.com/drhenner/nifty-generators.git Could not find paperclip-3.1.3 in any of the sources ! ! Failed to install gems via Bundler. ! ! Heroku push rejected, failed to compile Ruby/rails app ! [remote rejected] master -> master (pre-receive hook declined) I don't have paperclip- 3.1.3 in my gem file. I'm not sure why it's looking for paperclip 3.1.3 Here's my gem file source 'http://rubygems.org' gem 'rails', '~> 3.2.6' gem 'asset_sync' group :assets do gem 'uglifier', '>= 1.0.3' end gem 'sass-rails', " ~> 3.2.3" gem "activemerchant", '~> 1.17.0' #, :lib => 'active_merchant' gem 'authlogic', "3.0.3" gem 'bluecloth', '~> 2.1.0' gem 'cancan', '~> 1.6.7' gem 'compass', '~> 0.12.rc.0' gem 'compass-rails' gem 'dalli', '~> 1.1.5' gem "friendly_id", "~> 3.3" gem 'haml', ">= 3.0.13"#, ">= 3.0.4"#, "2.2.21"#, gem "jquery-rails" gem 'aws-sdk' group :production do gem 'pg' gem 'thin' end gem 'nested_set', '~> 1.6.3' gem 'nokogiri', '~> 1.5.0' gem 'paperclip', '~> 3.0' gem 'prawn', '~> 0.12.0' gem 'rails3-generators', '~> 0.17.0' gem 'rmagick', :require => 'RMagick' gem 'rake', '~> 0.9.2' gem 'state_machine', '~> 1.1.2' gem 'sunspot_solr' gem 'sunspot_rails', '~> 1.3.0rc' gem 'will_paginate', '~> 3.0.0' gem 'dynamic_form' group :development do gem 'sqlite3' gem "autotest-rails-pure" gem "rails-erd" gem "ruby-debug19" end group :test, :development do gem "rspec-rails", "~> 2.8.0" gem 'capybara', :git => 'git://github.com/jnicklas/capybara.git' gem 'launchy' gem 'database_cleaner' end group :test do gem 'factory_girl', "~> 3.3.0" gem 'factory_girl_rails', "~> 3.3.0" gem 'mocha', '~> 0.10.0', :require => false gem 'rspec-rails-mocha' gem "rspec", "~> 2.8.0" gem "rspec-core", "~> 2.8.0" gem "rspec-expectations", "~> 2.8.0" gem "rspec-mocks", "~> 2.8.0" gem 'email_spec' gem "faker" gem "autotest", '~> 4.4.6' gem "autotest-rails-pure" gem "autotest-growl" gem "ZenTest", '4.6.2' end

    Read the article

  • Running Cron Tasks on Heroku

    - by viatropos
    I've seen that Heroku charges $15/mo to run Delayed Job, and $3/mo to run cron tasks daily. Is it possible to skip that entirely and run my own cron tasks manually? Or are they somehow figuring out that I'm running cron tasks?

    Read the article

  • Typo blogging platform with Heroku hosting: theming

    - by Jack
    Does anyone know how to workarounds Heroku's limitations on writing to the theme files for the Typo blogging platform? I'd like to take advantage of the theming capabilities right from the browser. If any theme's stylesheet is changed I get the error message "Unable to write file" in addition to the fact that any theme being changed to one that is not the default causes the page to lose all styling and is displayed in plain text. I followed this (awesome) blog entry to get it up and working.

    Read the article

  • 2 Rails Apps, 1 Database (using Heroku)

    - by Paul A.
    I've made 2 apps, App A and App B. App A's sole purpose is to allow users to sign up and App B's purpose is to take select users from App A email them. Since App A & B were created independently & are hosted in 2 separate Heroku instances, how can App B access the users database in App A? Is there a way to push certain relevant rows from App A to App B?

    Read the article

  • Error when pushing to Heroku - StatementInvalid - Ruby on Rails

    - by bgadoci
    I am trying to deploy my first rails app to Heroku and seem to be having a problem. After git push heroku master I get an error saying that relation "tags does not exist. I understand that without knowledge of my application it will be hard to help but I am wondering if someone can point me in the right direction. I have checked the schema.rb file and also been over all my migrations and there doesn't seem to be a problem there. The error message lead me to believe that I left something out of my routes.rb file but can't seem to find anything there either. Perhaps just some help deciphering this message. Processing PostsController#index (for 99.7.50.140 at 2010-04-21 12:28:59) [GET] ActiveRecord::StatementInvalid (PGError: ERROR: relation "tags" does not exist : SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"tags"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum ): app/controllers/posts_controller.rb:9:in `index' /home/heroku_rack/lib/static_assets.rb:9:in `call' /home/heroku_rack/lib/last_access.rb:25:in `call' /home/heroku_rack/lib/date_header.rb:14:in `call' thin (1.0.1) lib/thin/connection.rb:80:in `pre_process' thin (1.0.1) lib/thin/connection.rb:78:in `catch' thin (1.0.1) lib/thin/connection.rb:78:in `pre_process' thin (1.0.1) lib/thin/connection.rb:57:in `process' thin (1.0.1) lib/thin/connection.rb:42:in `receive_data' eventmachine (0.12.6) lib/eventmachine.rb:240:in `run_machine' eventmachine (0.12.6) lib/eventmachine.rb:240:in `run' thin (1.0.1) lib/thin/backends/base.rb:57:in `start' thin (1.0.1) lib/thin/server.rb:150:in `start' thin (1.0.1) lib/thin/controllers/controller.rb:80:in `start' thin (1.0.1) lib/thin/runner.rb:173:in `send' thin (1.0.1) lib/thin/runner.rb:173:in `run_command' thin (1.0.1) lib/thin/runner.rb:139:in `run!' thin (1.0.1) bin/thin:6 /usr/local/bin/thin:20:in `load' /usr/local/bin/thin:20 Also, here is my routes.rb file if that helps at all. ActionController::Routing::Routes.draw do |map| map.resources :ugtags map.resources :wysihat_files map.resources :users map.resources :votes map.resources :votes, :belongs_to => :user map.resources :tags, :belongs_to => :user map.resources :ugtags, :belongs_to => :user map.resources :posts, :collection => {:auto_complete_for_tag_tag_name => :get } map.resources :posts, :sessions map.resources :posts, :has_many => :comments map.resources :posts, :has_many => :tags map.resources :posts, :has_many => :ugtags map.resources :posts, :has_many => :votes map.resources :posts, :belongs_to => :user map.resources :tags, :collection => {:auto_complete_for_tag_tag_name => :get } map.resources :ugtags, :collection => {:auto_complete_for_ugtag_ugctag_name => :get } map.login 'login', :controller => 'sessions', :action => 'new' map.logout 'logout', :controller => 'sessions', :action => 'destroy' map.root :controller => "posts" map.connect ':controller/:action/:id' map.connect ':controller/:action/:id.:format' end

    Read the article

  • How to process images with paperclip on Heroku?

    - by Yuri
    I use Heroku for my app. I want to auto-orient image and then to resize it. So I do: class User < ActiveRecord::Base Paperclip.options[:swallow_stderr] = false has_attached_file :photo, :styles => { :square => "100%", :large => "100%" }, :convert_options => { :square => "-auto-orient -geometry 70X70#", :large => "-auto-orient -geometry X300" }, :storage => :s3, :s3_credentials => "#{RAILS_ROOT}/config/s3.yml", :path => ":attachment/:id/:style.:extension", :bucket => 'mybucket' validates_attachment_size :photo, :less_than => 5.megabyte end It does not work with error: There was an error processing the thumbnail for stream.20143 What am I doing wrong?

    Read the article

  • SSL on Heroku / User Authentication Across Multiple Domains

    - by Euwyn
    Posted a previous question on this, but have a followup. I was trying to create a workaround to use SSL on the expensive custom domain. I'm willing to live with bumping a user to https://app.heroku.com from http://www.app.com for certain secure pages, and have monkey-patched SSL required to make this happen. However, now this issue is with making sure my User is logged in when I do so. As I understand, cookies aren't cross domain. Is there a way around this issue?

    Read the article

  • How can I calculate data for a boxplot (quartiles, median) in a Ralis app on Heroku? ( Heroku uses P

    - by hadees
    I'm trying to calculate the data needed to generate a box plot which means I need to figure out the 1st and 3rd Quartiles along with the median. I have found some solutions for doing it in Postgresql however they seem to depend on either PL/Python or PL/R which it seems like Heroku does not have either enabled for their postgresql databases. In fact I ran "select lanname from pg_language;" and only got back "internal". I also found some code to do it in pure ruby but that seems somewhat inefficient to me. I'm rather new to Box Plots, Postgresql, and Ruby on Rails so I'm open to suggestions on how I should handle this. There is a possibility to have a lot of data which is why I'm concerned with performance however if the solution ends up being too complex I may just do it in ruby and if my application gets big enough to warrant it get my own Postgresql I can host somewhere else. *note: since I was only able to post one link, cause I'm new, I decided to share a pastie with some relevant information

    Read the article

  • How can I calculate data for a boxplot (quartiles, median) in a Rails app on Heroku? (Heroku uses Po

    - by hadees
    I'm trying to calculate the data needed to generate a box plot which means I need to figure out the 1st and 3rd Quartiles along with the median. I have found some solutions for doing it in Postgresql however they seem to depend on either PL/Python or PL/R which it seems like Heroku does not have either enabled for their postgresql databases. In fact I ran "select lanname from pg_language;" and only got back "internal". I also found some code to do it in pure ruby but that seems somewhat inefficient to me. I'm rather new to Box Plots, Postgresql, and Ruby on Rails so I'm open to suggestions on how I should handle this. There is a possibility to have a lot of data which is why I'm concerned with performance however if the solution ends up being too complex I may just do it in ruby and if my application gets big enough to warrant it get my own Postgresql I can host somewhere else. *note: since I was only able to post one link, cause I'm new, I decided to share a pastie with some relevant information

    Read the article

  • twitter gem not working in heroku ?

    - by Luc
    Hello, I'm working on a ruby app that updates a twitter account using 'twitter' gem. It's working fine locally (as usual :) ). But when I deploy it on heroku it seems the gem is not properly installed or something lile that as I got the following error: NameError: uninitialized constant Twitter::OAuth My code is very simple: oauth = Twitter::OAuth.new(consumer_token, consumer_secret) oauth.authorize_from_access(access_token, access_secret) client = Twitter::Base.new(oauth) client.update("Updating my status from twitter gem. GREAT!") Is there a problem with this particular gem ? Thanks a lot for your help. Luc

    Read the article

  • time difference on heroku server

    - by railsnew
    There seems to be a time difference on heroku server. >> Customer.last.id => 584 >> Customer.last.created_at => Thu, 06 May 2010 01:43:20 UTC +00:00 >> Time.zone => #<ActiveSupport::TimeZone:0x2b1dec47e5c0 @utc_offset=0, @tzinfo=#<TZInfo::DataTimezone: Etc/UTC>, @name="UTC"> >> Time.now => Wed May 05 19:05:15 -0700 2010 >> Time.now.zone => "PDT" Notice that current time is May 05 19...however, created_at date for last record is May 06 01:43. This does not make any sense. What can be causing this and how would I go about fixing this?

    Read the article

  • Rails app + gmail smtp + heroku hosting + godaddy domain

    - by sagivo
    i'm trying to define a way to send emails using gmail. it all works fine on localhost but when i deploy to heroku nothing happens. i guess it has something to do with GoDaddy MX records? here is what i tried: ActionMailer::Base.smtp_settings = { :address => "smtp.gmail.com", :port => 587, :domain => "gmail.com", :user_name => "my_user", :password => "my_pass", :authentication => "plain", :enable_starttls_auto => true } i can't change the GoDaddy MX records since i'm forwording some emails from there to my Gmail account. am i missing something? EDIT- it turns out the problem was with my Gmail account. all i needed to turn off the 2-step verification. Problem solved.

    Read the article

  • Problem with videos on heroku

    - by mnml
    Hi, I have recently moved my RoR app on the Heroku platform, and almost everything works fine apart from the videos. It works fine when my app runs in local but not on heroku. This is the error log I'm getting, if anyone knows where it can be coming from: Processing VideosController#new (for IP at 2010-03-20 04:32:09) [GET] Session ID: 6abecf60c3369d7c7029e366bb801e08 Parameters: {"artist_id"=>"10", "action"=>"new", "controller"=>"admin/videos"} Rendering within layouts/admin Rendering admin/videos/new ActionView::TemplateError (undefined method `video_file_relative_path' for #<Video:0x2adc9839fe28>) on line #21 of app/views/admin/videos/ _form.rhtml: 18: 19: <p><label for="videos_image_file">Fichier Vidéo SWF</label><br/> 20: <% if @video.video_file %> 21: <%= link_to image_tag(url_for_file_column("video", "video_file", :name => "thumbnail"))+"<br>", {:controller => url_for_file_column("video", "video_file")}, :popup => ['new_window', 'height=200,width=200'] %> 22: <% end %> 23: <%= file_column_field 'video', 'video_file' %> 24: &nbsp;&nbsp;&nbsp; #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/base.rb: 1792:in `method_missing' #{RAILS_ROOT}/vendor/plugins/file_column/lib/file_column_helper.rb: 75:in `send' #{RAILS_ROOT}/vendor/plugins/file_column/lib/file_column_helper.rb: 75:in `url_for_file_column' #{RAILS_ROOT}/app/views/admin/videos/_form.rhtml:21:in `_run_rhtml_admin_videos__form' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb: 314:in `send' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb: 314:in `compile_and_render_template' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb: 290:in `render_template' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb: 249:in `render_file' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb: 264:in `render' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/partials.rb: 59:in `render_partial' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ benchmarking.rb:33:in `benchmark' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/partials.rb: 58:in `render_partial' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb: 276:in `render' #{RAILS_ROOT}/app/views/admin/videos/new.rhtml:4:in `_run_rhtml_admin_videos_new' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb: 314:in `send' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb: 314:in `compile_and_render_template' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb: 290:in `render_template' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb: 249:in `render_file' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ base.rb:699:in `render_file' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ base.rb:621:in `render_with_no_layout' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ layout.rb:243:in `render_without_benchmark' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ benchmarking.rb:53:in `render' /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ benchmarking.rb:53:in `render' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ base.rb:911:in `perform_action_without_filters' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ filters.rb:368:in `perform_action_without_benchmark' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ benchmarking.rb:69:in `perform_action_without_rescue' /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ benchmarking.rb:69:in `perform_action_without_rescue' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ rescue.rb:82:in `perform_action' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ base.rb:381:in `send' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ base.rb:381:in `process_without_filters' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ filters.rb:377:in `process_without_session_management_support' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ session_management.rb:117:in `process' #{RAILS_ROOT}/vendor/rails/railties/lib/dispatcher.rb:38:in `dispatch' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/rack/adapter/ rails.rb:60:in `serve_rails' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/rack/adapter/ rails.rb:80:in `call' /home/heroku_rack/lib/static_assets.rb:9:in `call' /home/heroku_rack/lib/last_access.rb:25:in `call' /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb: 46:in `call' /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb: 40:in `each' /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb: 40:in `call' /home/heroku_rack/lib/date_header.rb:14:in `call' /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb: 60:in `call' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/ connection.rb:80:in `pre_process' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/ connection.rb:78:in `catch' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/ connection.rb:78:in `pre_process' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/ connection.rb:57:in `process' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/ connection.rb:42:in `receive_data' /usr/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.6/lib/ eventmachine.rb:240:in `run_machine' /usr/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.6/lib/ eventmachine.rb:240:in `run' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/backends/ base.rb:57:in `start' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/server.rb: 150:in `start' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/controllers/ controller.rb:80:in `start' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/runner.rb: 173:in `send' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/runner.rb: 173:in `run_command' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/runner.rb: 139:in `run!' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/bin/thin:6 /usr/local/bin/thin:20:in `load' /usr/local/bin/thin:20 Thanks

    Read the article

  • Locking DB w/ Large Reads (Ruby-on-Rails/Heroku)

    - by Splashlin
    Currently I have a Web API running on Heroku that is constantly writing information we're collecting from other data sources (currently theres about half a GB of data and it's growing very quickly). We're looking to add a reporting system on top of the current database that we can use to extract useful information out of the DB. The problem is that when we're running reports we're locking the DB and any other sites communicating with the DB are timing out. Does anyone have any solutions on how to solve this type of issue? Amazon RDS seems to have some interesting stuff with database replication but I don't know if that will solve my problems. Any advice would be greatly appreciated. Thanks

    Read the article

  • Paperclip generating wrong URLs in Heroku

    - by Tony
    Paperclip is generating wrong URLs in Heroku. I have an Audio model which has a mp3 field as follows: class Audio < ActiveRecord::Base has_attached_file :mp3, :storage => :s3, :s3_credentials => S3_CREDENTIALS, :bucket => S3_CREDENTIALS[:bucket], :path => ":rails_root/public/system/:attachment/:id/:style/:filename", :url => "/system/:attachment/:id/:style/:filename" I am calling audio.mp3.url from a controller, and it returns http://s3.amazonaws.com/MyApp/audios/mp3s//original/96a9ae89302fdf8462ee05eb829f2e17578b144e20120908-2-11f61zr.mp3?1347135050 instead of http://s3.amazonaws.com/MyApp/audios/mp3s/000/000/004/original/96a9ae89302fdf8462ee05eb829f2e17578b144e20120908-2-11f61zr.mp3?1347135050 (which works) Why is it missing the '000/000/004' part of the route? The same model is generating the right URL when used in a view. Any help? I am using paperclip 3.2.0 and Rails 3.1.8. Any help?

    Read the article

  • heroku time zone problem

    - by Ole Morten Amundsen
    Why does Time.now yield the server local time when I have set the another time zone in my environment.rb config.time_zone = 'Copenhagen' I've put this in a view <p> Time.zone <%= Time.zone %> </p> <p> Time.now <%= Time.now %> </p> <p> Time.now.utc <%= Time.now.utc %> </p> <p> Time.zone.now <%= Time.zone.now %> </p> <p> Time.zone.today <%= Time.zone.today %> </p> rendering this result on my app at heroku Time.zone (GMT+01:00) Copenhagen Time.now Mon Apr 26 08:28:21 -0700 2010 Time.now.utc Mon Apr 26 15:28:21 UTC 2010 Time.zone.now 2010-04-26 17:28:21 +0200 Time.zone.today 2010-04-26 Time.zone.now yields the correct result. Do I have to switch from Time.now to Time.zone.now, everywhere? Seems cumbersome. I truly don't care what the local time of the server is, it's giving me loads of trouble due to extensive use of Time.now. Am I misunderstanding anything fundamental here?

    Read the article

  • Heroku Rails Internal Server Error

    - by Ryan Max
    Hello. I got a 500 Internal Sever error when I try to deploy my rails app on heroku. It works fine on my local machine, so i'm not sure what's wrong here. Seems to be something with the "sessions" on the home controller. Here is my log: ==> production.log <== # Logfile created on Sun May 09 17:35:59 -0700 2010 Processing HomeController#index (for 76.169.212.8 at 2010-05-09 17:36:00) [GET] ActiveRecord::StatementInvalid (PGError: ERROR: relation "sessions" does not ex ist : SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a .attnotnull FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"sessions"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum ): lib/authenticated_system.rb:106:in `login_from_session' lib/authenticated_system.rb:12:in `current_user' lib/authenticated_system.rb:6:in `logged_in?' lib/authenticated_system.rb:35:in `authorized?' lib/authenticated_system.rb:53:in `login_required' /home/heroku_rack/lib/static_assets.rb:9:in `call' /home/heroku_rack/lib/last_access.rb:25:in `call' /home/heroku_rack/lib/date_header.rb:14:in `call' thin (1.2.7) lib/thin/connection.rb:76:in `pre_process' thin (1.2.7) lib/thin/connection.rb:74:in `catch' thin (1.2.7) lib/thin/connection.rb:74:in `pre_process' thin (1.2.7) lib/thin/connection.rb:57:in `process' thin (1.2.7) lib/thin/connection.rb:42:in `receive_data' eventmachine (0.12.10) lib/eventmachine.rb:256:in `run_machine' eventmachine (0.12.10) lib/eventmachine.rb:256:in `run' thin (1.2.7) lib/thin/backends/base.rb:57:in `start' thin (1.2.7) lib/thin/server.rb:156:in `start' thin (1.2.7) lib/thin/controllers/controller.rb:80:in `start' thin (1.2.7) lib/thin/runner.rb:177:in `send' thin (1.2.7) lib/thin/runner.rb:177:in `run_command' thin (1.2.7) lib/thin/runner.rb:143:in `run!' thin (1.2.7) bin/thin:6 /usr/local/bin/thin:20:in `load' /usr/local/bin/thin:20 Rendering /disk1/home/slugs/155328_f2d3c00_845e/mnt/public/500.html (500 Interna l Server Error) And here is my home_controller.rb class HomeController < ApplicationController before_filter :login_required def index @user = current_user @user.profile ||= Profile.new @profile = @user.profile end end Does it have something the way my routes are set up? Or is it my authentication? (I am using restful authentication with Bort)

    Read the article

  • Rails CSS not Loading using Heroku

    - by eWizardII
    I have the following site set up here on Heroku - http://www.peerinstruction.net/users/sign_up the issue is that I have updated the css yet it is not being actively reflected on the site, it just shows a textbox, with some edited/custom fonts. I have attached the css file in the following gist - https://gist.github.com/f74b626c54ecbb60bbde The signup page controller: !!! Strict %html %head %title= yield(:title) || "Untitled" = stylesheet_link_tag 'application', 'web-app-theme/base', 'web-app-theme/themes/activo/style', 'web-app-theme/override' = javascript_include_tag :defaults = csrf_meta_tag = yield(:head) %body #container #header %h1 %a{:href => "/"} Peer Instruction Network #user-navigation %ul.wat-cf %li .content.login .flash - flash.each do |type, message| %div{ :class => "message #{type}" } %p= message = form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { :class => "form login" }) do |f| .group.wat-cf .left= f.label :email, :class => "label right" .right= f.text_field :email, :class => "text_field" .group.wat-cf .left= f.label :password, :class => "label right" .right= f.password_field :password, :class => "text_field" .group.wat-cf .right %button.button{ :type => "submit" } Login /= link_to "Sign In", destroy_user_session_path #box = yield The signup pages haml file: %h2 .block .content.login .flash - flash.each do |type, message| %div{ :class => "message #{type}" } %p= message = form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| = devise_error_messages! %div = f.label :firstname %br/ = f.text_field :firstname %div = f.label :middlename %br/ = f.text_field :middlename %div = f.label :lastname %br/ = f.text_field :lastname %div = f.label :email %br/ = f.email_field :email %div = f.label :password %br/ = f.password_field :password %div = f.label :academic %br/ = f.text_field :academic %div= f.submit "Continue" = render :partial => "devise/shared/links" I used web-app-theme to create an activo theme and then modify it.

    Read the article

  • Postgres error with Sinatra/Haml/DataMapper on Heroku

    - by sevennineteen
    I'm trying to move a simple Sinatra app over to Heroku. Migration of the Ruby app code and existing MySQL database using Taps went smoothly, but I'm getting the following Postgres error: PostgresError - ERROR: operator does not exist: text = integer LINE 1: ...d_at", "post_id" FROM "comments" WHERE ("post_id" IN (4, 17,... ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. It's evident that the problem is related to a type mismatch in the query, but this is being issued from a Haml template by the DataMapper ORM at a very high level of abstraction, so I'm not sure how I'd go about controlling this... Specifically, this seems to be throwing up on a call of p.comments from my Haml template, where p represents a given post. The Datamapper models are related as follows: class Post property :id, Serial ... has n, :comments end class Comment property :id, Serial ... belongs_to :post end This works fine on my local and current hosted environment using MySQL, but Postgres is clearly more strict. There must be hundreds of Datamapper & Haml apps running on Postgres DBs, and this model relationship is super-conventional, so hopefully someone has seen (and determined how to fix) this. Thanks!

    Read the article

  • Database locking: ActiveRecord + Heroku

    - by JP
    I'm building a Sinatra based app for deployment on Heroku. You can imagine it like a standard URL shortener but where old shortcodes expire and become available for new URLs (I realise this is a silly concept but its easier to explain this way). I'm representing the shortcode in my database as an integer and redefining its reader to give a nice short and unique string from the integer. As some rows will be deleted, I've written code that goes thru all the shortcode integers and picks the first free one to use just before_save. Unfortunately I can make my code create two rows with identical shortcode integers if I run two instances very quickly one after another, which is obviously no good! How should I implement a locking system so that I can quickly save my record with a unique shortcode integer? Here's what I have so far: Chars = ('a'..'z').to_a + ('A'..'Z').to_a + ('0'..'9').to_a CharLength = Chars.length class Shorts < ActiveRecord::Base before_save :gen_shortcode after_save :done_shortcode def shortcode i = read_attribute(:shortcode).to_i return '0' if i == 0 s = '' while i > 0 s << Chars[i.modulo(CharLength)] i /= 62 end s end private def gen_shortcode shortcode = 0 self.class.find(:all,:order=>"shortcode ASC").each do |s| if s.read_attribute(:shortcode).to_i != shortcode # Begin locking? break end shortcode += 1 end write_attribute(:shortcode,shortcode) end def done_shortcode # End Locking? end end

    Read the article

  • Unknown Argument Error "-p" when deploying to heroku.

    - by user3312278
    We are deploying a rails app to Heroku. The app should be making a youtube api call, using the Trollop Gem as a command line parser. We keep getting this error back. 2014-07-30T23:17:57.526014+00:00 app[web.1]: Error: unknown argument '-p'. 2014-07-30T23:17:57.526020+00:00 app[web.1]: Try --help for help. 2014-07-30T23:17:57.526541+00:00 app[web.1]: Completed 500 Internal Server Error in 7466ms This is what our Trollop code looks like. def self.youtube_search(query) p ENV["YOUTUBE_DEVELOPER_KEY"] p query p "point of no return" p "*"*25 youtube_service_api_name = "youtube" youtube_api_version = "v3" # opts = HTTParty.get("https://www.youtube.com/results?search_query=russia") opts = Trollop::options do opt :q, 'Search term', :source => String, :default => query opt :maxResults, 'Max results', :source => :int, :default => 25 end What's much stranger is that it was working an hour ago and now it's not. Does anyone have any ideas? This doesn't seem to be documented anywhere.

    Read the article

  • Heroku DJango app development on Windows

    - by Cliff
    I'm trying to start a Django app on Heroku using Windows and I'm getting stuck on the following error when I try to pip install psycopg2: Downloading/unpacking psycopg2 Downloading psycopg2-2.4.5.tar.gz (719Kb): 719Kb downloaded Running setup.py egg_info for package psycopg2 Error: pg_config executable not found. Please add the directory containing pg_config to the PATH or specify the full executable path with the option: python setup.py build_ext --pg-config /path/to/pg_config build ... or with the pg_config option in 'setup.cfg'. Complete output from command python setup.py egg_info: running egg_info creating pip-egg-info\psycopg2.egg-info writing pip-egg-info\psycopg2.egg-info\PKG-INFO writing top-level names to pip-egg-info\psycopg2.egg-info\top_level.txt writing dependency_links to pip-egg-info\psycopg2.egg-info\dependency_links.txt writing manifest file 'pip-egg-info\psycopg2.egg-info\SOURCES.txt' warning: manifest_maker: standard file '-c' not found I've googled the error and it seems you need libpq-dev python-dev as dependencies for postgres under Python. I also turned up a link that says you gt into trouble if you don't have the postgres bin folder in your Path so I installed Postgres manually and tried again. This time I get: error: Unable to find vcvarsall.bat I am still a python N00b so I am lost. Could someone point me in a general direction?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >