I'm trying to deploy an app on heroku.
My trouble is to install hattachement_fu plugin.
I ran the following command to install it directly on the server.
heroku plugins:install http://github.com/technoweenie/attachment_fuand"
and I get the following message :
Unable to load plugin: some_plugin: uninitialized constant ActiveRecord
Already up-to-date.
attachment_fu installed
So seams that the plugin is installed but something get wrong above ...
But in my logs I continue to get :
NoMethodError (undefined method `has_attachment' for #<Class:0x2b3fed47a830>):
Like if the plugin was not there.
Any idea about what's going on ?
That's not how plugins work. The command you used is for installing plugins to the heroku command line tool.
If you want to install a Rails plugin, go to your project folder and script/plugin install foo (or however your version of rails installs plugins), commit it, then push to heroku.
Related
I'm having an intermittent issue where my Jekyll site fails to build due to a gem installer error:
Gem::InstallError: public_suffix requires Ruby version >= 2.0.
My understanding is that Pages runs Ruby 2.x, but Travis shows v1.9.3 during the failed build.
I haven't built the site locally - just forked a repo, bumped a few files via prose.io, and the build fails. I had the same issue a couple of days ago on committing a new post, but it seemed to resolve itself.
Any suggestions as to how to correct this?
Per this issue (the very first result when I googled your error message), you need to explicitly specify your Ruby version in .travis.yml:
The current TravisCI default Ruby 1.9.3 is now too old for the pages gem (see http://docs.travis-ci.com/user/languages/ruby/#Supported-Ruby-Versions), so we should ask TravisCI to use Ruby 2.1.1 to match what is currently used on GitHub pages (https://pages.github.com/versions/).
i.e. your .travis.yml should include:
language: ruby
rvm: 2.1.1
script: "bundle exec jekyll build"
I'm trying to install the gem 'taglib-ruby' on Heroku. This gem compiles as a native extension which requires a system dependency called taglib, so after compiling and uploading it through heroku vulcan, I achieved to compile the gem via command line on heroku bash:
bundle exec gem install taglib-ruby -- --with-opt-dir=/app/vendor/taglib
And in order to this parameter would be used by bundler later, I added it as a bundler configuration through the command:
bundle config build.taglib-ruby '--with-opt-dir=/app/vendor/taglib'
I've already verified this config was applied, inspecting the file /.bundle/config and looking for the line BUNDLE_BUILD__TAGLIB-RUBY.
However after pushing out my project to heroku and while it is executing the bundle install command, heroku complains that the above gem (taglib-ruby) cannot be installed due the taglib library isn't present, although it's what I was trying to solve with the option '--with-opt-dir=/app/vendor/taglib' mentioned above.
So it appears that Heroku is ignoring the bundler configuration.
What could be happening? Do you know another way the achieve the same intention (install a gem with custom build options) on Heroku?
I'm trying to deploy redmine folowing this tutorial, but when I run this command
heroku run rake db:migrate
I recieve this message:
DEPRECATION WARNING:
You have Rails 2.3-style plugins in vendor/plugins! Support for these
plugins will be removed in Rails 4.0. Move them out and bundle them in
your Gemfile, or fold them in to your app as lib/myplugin/* and
config/initializers/myplugin.rb.
See the release notes for more on
this:
http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released.
(called from at /app/Rakefile:7)
Plugins in
vendor/plugins (/app/vendor/plugins) are no longer allowed. Please,
put your Redmine plugins in the plugins directory at the root of
your Redmine directory (/app/plugins)
I put the plugin folder at redmine/lib in redmine/
And nothing hapens.
Any body can help me?
This has to do with the ruby buildpack - it has nothing to do with your application. Deploying a stock Ruby on Rails app will display this message.
Are you getting any errors running your application?
I've been working on this issue for quite some time now and I did not come up with an solution so far. I have installed redmine via a bitnami stack. I set up git via gitosis as well, and now I'm trying to install the gitosis plugin for redmine. But when I try to activate the plugin with "rake redmine:plugins:migrate RAILS_ENV=production" I get the following error:
rake aborted!
No such file to load -- lockfile
Tasks: TOP => db:migrate_plugins => redmine:plugins:migrate => environment
(See full trace by running task with --trace)
I ran the command with the use_redmine script. I already installed lockfile via "gem install lockfile". bundle check returns that all dependencies are satisfied, but I still can't get this thing to work.
After reading some similar questions here, I guess it could have something to do with the passenger module.
I figured it out now. Sorry, I forgot about my post here.
The solution was kinda dumb. I did install the required packages, but I did not include them in my Gemfile.
Developing Rails and even installing Rails Applications can be a real pain in the butt -.-
I haven't used Ruby. I don't know what gems are. But I know how to install them and do basic things like that.
I heard of Jekyll and decided to start my own using Heroku. I found Rack-Jekyll that will work on Heroku.
I created my site as per Jekyll instructions and it is running fine on my system. Then I did what I was told to do in http://github.com/bry4n/rack-jekyll#readme. But when I push it to Heroku, I get an error:
---> Heroku received push
---> Rack app detected
---> Installing rack-jekyll from http://rubygems.org
ERROR: could not find gem "rack-jekyll" locally or in a repository
On seeing this, I downloaded the rack-jekyll.gem file and committed it to the repsitory and tried uploading it. Even that didn't work. Can you tell me precisely what to do?
Updated (ht Andrew): use heroku's Bundler support
create a Gemfile like so
source "http://rubygems.org"
gem "rack-jekyll"