Menu
  • HOME
  • TAGS

Error when trying to release private pod: Gem::LoadError: Unable to activate cocoapods-0.33.1, because activesupport-4.0.2

Tag: gem,rake,cocoapods

When running rake release with a Rakefile generated by Cocoapods to release a version of my private pod I get the following error:

Gem::LoadError: Unable to activate cocoapods-0.33.1, because activesupport-4.0.2 conflicts with activesupport (< 4, >= 3.2.15)

I understand that there seems to be a dependency conflict, but don't know how to resolve it. I tried uninstalling cocoapods (with gem cleanup cocoapods and gem uninstall cocoapods) and tried removing old versions of other gems with gem cleanup (which seemed to delete a lot of stuff). But that didn't help.

Also, since I'm not actually doing ruby development but just use the generated rake file to release a cocoa pod, I don't think that Bundler would help me, or does it?

Any ideas how to fix that?

Best How To :

You just need to downgrade the version of activesupport.

Run gem uninstall activesupport and delete any versions that are >= 4. If you had a valid previous version installed already then you should be good to go.

If you don't run gem install activesupport --version 3.2.18 to get a valid version.

Can I use limits, orders or date queries with the Ruby DBF gem?

ruby-on-rails,ruby,import,gem,dbf

While you cannot use ActiveRecord style queries, DBF::Table is an Enumerable, so you can utilize any of the enumerable methods to do most of what you want. For example, let's say you only want widgets that were created between 1/1/2005 and 7/15/2005. Let's also assume that the widgets table has...

Authenticating Heroku gem from rake task

ruby-on-rails,heroku,rake

For non-interactive login, you need to use an API key, which Heroku will read from the HEROKU_API_KEY environment variable. You can fetch the key for your account from a logged-in CLI using heroku auth:token. There's no way to avoid authentication just because you're running inside Heroku already. That would have...

ActiveAdmin ::Show 4 textbox in active admin using has_many relationship

ruby-on-rails,gem,activeadmin

Add the following to your Polls Controller- def new @poll = Poll.new 4.times do @poll.answers.build end end ...

“PHP Composer” compared with “Ruby Gems and Bundler”

php,ruby,gem,composer-php,bundler

1) Composer is more similar to bundler. Composer brings everything in your project, bundler brings everything to your system and "links" them in the context of your project. Bundler is working with gems in the back. 2) yes. gem install does things system-wide (or per user if you use something...

Specific test behaviour for ruby gem — mocking sleep

ruby,rspec,gem

As you say it is difficult to know whether you are actually in a test-like environment, so the solution is not to try: provide a method that allows users of your gem to indicate that sleeps should not occur. You could try and autodetect whether you should default to not...

How to retry a rake task if you get a Bad Gateway error response from a web source

ruby-on-rails,ruby,rake,instagram-api

Chad Pytel and Tammer Saleh call this "Fire and forget" antipattern in their Rails Antipatterns book: Assuming that the request always succeeds or simply not caring if it fails may be valid in rare circumstances, but in most cases it's unsufficient. On the other hand, rescuing all the exceptions would...

How to use null=>false in a migration file?

ruby-on-rails,rake

You are trying to update the provider and uid columns to not allow null values, and you have written your migration correctly. This error is arising because one or more of them (at least provider) already contains records with null values. You'll have to either drop the records with null...

gem and ruby commands causing `require': cannot load such file — monitor

ruby,gem,redhat

Instead of messing around with system ruby, you can try setting up ruby using a ruby version manager like rvm or rbenv: rvm: https://rvm.io/ rbenv: https://github.com/sstephenson/rbenv...

Shoppe gem each method on product categories

ruby-on-rails,ruby-on-rails-4,methods,gem

Try rewriting it to this instead: <% Shoppe::ProductCategory.all.each do |prod| %> <li><%= prod.name %></li> <% end %> You need to call all on the Shoppe::ProductCategory to be able to iterate over the collection. Hope it helps!...

how to localize Russian date?

ruby-on-rails,ruby-on-rails-4,gem

You should use the I18n localize helper (it has a short alias l): <%= l diary.created_at, format: :long %> You can also specify the format explicitly: <%= l diary.created_at, format: "%e %b %Y" %> http://apidock.com/rails/ActionView/Helpers/TranslationHelper/localize...

rake -T cannot show my tasks

ruby,rake

Well, it is not coming as you didn't use any descriptions. Add a description using desc like below : $ cat Rakefile namespace :access_token do desc "some tasks" task :refresh do end end $ rake -T rake access_token:refresh # some tasks Now, if I remove the desc, it wouldn't come....

Deployment with Rake Causing Image Permission Errors (600)

ruby,rake,web-deployment,file-permissions

Rake isn't really your problem here. Rake doesn't know anything about uploading files or setting permissions; it just runs the commands as defined in the task. The actual file upload is happening via rsync. According to the rsync man page, you should be able to use the option -p (AKA...

How to exclude files/directories when running a Cucumber Rake task?

ruby,tags,cucumber,rake

Cucumber::Rake::Task.new(:all_tag_1) do |t| tags = '--tags [email protected] --tags @tag1' t.cucumber_opts = "features/scenarios/folder_1 --format html --out features/build_results/all_tag_1.html --format pretty #{tags} --format junit --out features/build_results/reports" end This command will only run scenarios from features/scenarios/folder_1 folder... ...

Ruby C gem memory pollution between runs

c,ruby,gem

Fixed by using ALLOC_N instead of malloc. http://clalance.blogspot.com/2011/01/writing-ruby-extensions-in-c-part-12.html was helpful, though it says malloc should work.

How to grant a folder with write permissions for installing gems in Ruby

ruby-on-rails,ruby,gem,install

sudo chmod 777 directory_name It grants all permissions to the user....

CircleCI gems caching

ruby-on-rails,gem,bundler,circleci

The solution is simple: CircleCI runs some commands by default and caches gems also by default in vendor/bundle, so there is no need to add anything to cache_directories. Among those default commands is bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3, that checks presence of gems in the cache...

Why the module `ClassMethods` defined and extended in the same namespace?

ruby,gem

module MyModule class << self def included(base) base.extend ClassMethods # what would this be for? end <...> end <...> end This is actually a pretty common practice in Ruby. Basically, what it's saying is: when some object performs include MyModule, make it also extend MyModule::ClassMethods. Such a feat is useful...

Executable “require” can't find it's own library

ruby,gem,rubygems

Your gem should have a lib directory. During development, you will need to get that lib directory added to Ruby's load path one way or another. You can add it in Ruby code. I wouldn't recommend doing that in your situation, but it is helpful to put something like this...

How to diagnose slow rails / rake / rspec tasks

ruby-on-rails,ruby,rspec,rake,rakefile

Thanks to @MaxWilliams for the link to this post How do I debug a slow rails app boot time? I started using Mark Ellul's Bumbler - http://github.com/mark-ellul/Bumbler It gave me exactly what I wanted - an insight into what's going in the background and which gems are taking the time....

Rake not exporting PATH

ruby,path,environment-variables,rake

When using sh from within a Rake task, it spawns a shell and executes the command. The lifetime of environment variables, PATH being one of them, is until the shell exits. So the :make_path task spawns a shell that exports this variable and then exits. Next time a shell is...

Ruby gems path issue (system vs brew)

ruby,gem,homebrew

Found the answer, the system rubygems.rb was referencing the wrong version of Ruby. More details here: https://github.com/Homebrew/homebrew/issues/31220

Does Ruby support nonblocking HTTP requests without a third-party library?

ruby,http,asynchronous,gem,eventmachine

Based on my tests, MRI does support nonblocking HTTP requests simply by using a thread. Threads don't always allow parallelism in Ruby due to the GIL, but net/http appears to be one of the exceptions: require 'net/http' require 'benchmark' uri = URI('http://stackoverflow.com/questions/30899019/') n = 10 Benchmark.bm do |b| b.report {...

cannot load such file

ruby,gem,require

Are you using Bundler? I would recommend that. Then running your binary would be simply as: bundle exec ./bin/boss_mailer.rb Please make sure that you configure the $LOAD_PATH correctly in your boss-mailer.gemspec correctly, but if you've followed the best practices you've probably already done that....

Rake `directory` does not recursively create folders

ruby,rake

You can use mkdir_p in FileUtils task :create_directories do FileUtils.mkdir_p 'build/subfolder' end documentation HTH...

Ruby byebug never stops

ruby-on-rails,ruby,gem,rubygems,byebug

I had downgrade to a lower version of byebug and it works. Not sure what incompatibilities there may have been with the latest version. Using 3.5.1 worked for me. gem 'byebug', '~> 3.5.1' ...

Ruby Compass ERROR: Failed to build gem native extension

ruby-on-rails,ruby,gem,compass

mkmf.rb can't find header files for ruby at You need the ruby dev headers files to compile gems. You need the package ruby2.1-dev. You may also need other packages like build-essential. Try the following: sudo apt-get install ruby2.1-dev build-essential ...

Trying to push Rails 4.2.1 app to Heroku sqlite error

ruby-on-rails,heroku,gem

It is very common to run with SQLite in development and test and a different database like PostgreSQL in production. Rails makes it easy to do this. In your Gemfile, you can use groups to specify which gems should be installed in each environment. So, in this scenario, your gemfile...

How to install gem via Makefile if it doesn't exist

ruby,makefile,gem

From the command line you can see if a gem is installed with gem list <gemname>. This prints out a list of installed gems that match <gemname>: $ gem list sass *** LOCAL GEMS *** sass (3.4.13, 3.4.1, 3.2.19) sass-rails (5.0.1, 4.0.3) The argument is actually a regex, so you...

Don't know how to build task 'generate_secret_token'

ruby-on-rails,database,gem

Check if your rake task has the following format: namespace :your_namespace do desc 'Description for rake task' task generate_secret_token: :environment do end end While running rake task, run as 'rake namespace:generate_secret_token'...

Rails Fetch record from instagram using cron job

ruby-on-rails,gem,instagram-api,cron-task

We can fetch users media if we have his instagram id and just pass app client_id in request method

Ruby gem spreadsheet returning dates as doubles

ruby,excel,postgresql,gem,spreadsheet

@engineersmnky comment and this post helped me figure it out. How to convert MS excel date from float to date format in Ruby? require 'date' require 'active_support/time' puts (DateTime.new(1899,12,30) + 42153.days).strftime("%Y-%m-%d") puts (Time.at( (42153 - 25569).days ).utc).strftime("%Y-%m-%d") Either of these solutions work. Basically excel stores dates as doubles and you...

Rails-way to execute one-off task on Rails server startup

ruby-on-rails,ruby,rake,foreman

Can be achieved with Foreman by running in the same process as daemonized task (e.g. with rails server). If one-off taks is rake lego:update_all Then corresponding Procfile is web: rake lego:update_all && rails s sidekiq: bundle exec sidekiq ...

rails uninitialized constant Sprockets::SassCacheStore

ruby-on-rails,ruby,sass,gem,sprockets

Okay so here goes: I've found the problem and it was solved by actually supplying a version that works with rails 4.2. The default gem compass-rails installs a version incompatible with sprockets. When I added the specific version as seen here and ran another bundle the versions of most of...

rake db:seed yields syntax error, unexpected '\n', expecting => [closed]

ruby-on-rails,ruby,terminal,syntax-error,rake

You have a typo on line 16th: Location.create(area: 'College Ave', should be Location.create(area: 'College Ave') ...

using devise WITHOUT the gem, can I simply copy the files?

ruby-on-rails,ruby,devise,gem,rubygems

See http://bundler.io/v1.5/git.html Bundler also allows you to work against a git repository locally instead of using the remote version. This can be achieved by setting up a local override: bundle config local.GEM_NAME /path/to/local/git/repository Also http://ryanbigg.com/2013/08/bundler-local-paths/ "There's a little known feature of Bundler that allows you to use a local Git...

Association Error with Sorcery Gem in Rails

ruby-on-rails,ruby,authentication,gem,sorcery

That's actually a very weird error if the above is really your code. You should have gotten something like Couldn't find Bar with 'id'= instead. The error above is usually only given if you provide no args to find at all, ie. User.find() Anyway, the underlying problem here is that...

Emulation for ERB extention -%> for the purpose of unittests

ruby,rake,chef,erb

In order to use the -%> syntax in ERB you need to set the trim mode option to '-'. This is the third option to the constructor, you will need to pass nil as the second (unless you want to change the safe_level from the default): ERB.new(" <% if var...

Database Migrations on Secondary Database on Heroku

ruby-on-rails,ruby,database,heroku,rake

Working with Heroku support, I was not able to get this to work with the current configuration. So in the end I decided to create a database for our staging app. Imported the latest dump file from production. And ran heroku run rake db:migrate against staging. I still got the...

Why I get undefined method `meta_keywords' when running rake db:setup?

ruby-on-rails,rake,refinerycms

The reason you get this error is because meta_keywords used to exist, but now it doesn't. Make sure you are using an up to date version of the seo_meta library.

Cannot install RMagic gem

ruby-on-rails,gem

Look at where it fails (which was hard to work out because your newlines got swallowed somewhere): checking for ImageMagick version >= 6.4.9... * extconf.rb failed * This check didn't get a "yes", which suggests that the libmagickwand-dev package you installed did not provide a version of ImageMagic >= 6.4.9...

How to deal with forked gems and bundle

ruby-on-rails,git,github,gem,bundler

Gemfile.lock should know what gem to load, when you do bundle update or installing a new gem, Gemfile.lock will be updated too with new gems, paths, etc.. and also the revision hash. The hash at the end of the Fetch/Push URL that you see when you run git remote show...

Bundler can't find a gem that I can install using gem install

ruby,gem,bundler,rbenv

it seems like you are missing a , between the gem name and the version in the gemspec: spec.add_runtime_dependency("rwanda", "~> 0.6.0") ...

Error installing nokogiri in ubuntu 14.0.4 (Ruby 1.8.7)

ruby,ubuntu,gem,install,nokogiri

I tried the following commands and I've got it. Thanks to Mr.Kumar $ sudo apt-get update $ sudo apt-get install libxml2-dev $ sudo apt-get install libxslt-dev $ sudo gem install nokogiri -v '1.4.7' $ gem list nokogiri *** LOCAL GEMS *** nokogiri (1.4.7) ...

How do I Monkey-patch a gem with a hierarchy?

ruby,gem,thor

You can reopen classes in ruby: class Thor::Shell::Basic def extension_method end end Or you can inlcude your extension(s) as a module (I prefer this one): module MyExtension def extension_method end end Thor::Shell::Basic.send :include, MyExtension ...

Booking GEM recommendation - Rails4 [closed]

ruby-on-rails,ruby,gem

To build a site like airbnb , you will need 2 set of users . Let's say renters and buyers . You can create different users using devise . Devise provides a lot of in built goodies that would help you get up and started easily . Next you would...

Why is bundler requiring an extremely old version of a gem when version not specified?

ruby,gem,bundler

Bundler uses rubygems, which, when not given a specific version, defaults to the last version marked 'stable', which, if the tag isn't maintained, can mean even terribly deprecated builds.

rake install command is not working (gem 'octopress', '~> 3.0.7')

ruby,ruby-on-rails-4,rake

Assuming you have not created any tasks file in lib/tasks, you won't have any task named install. rake -T will list all of your available tasks (look for a line starting with "rake install"). btw, what are you trying to achieve?...

Socialization likes

ruby-on-rails,ruby-on-rails-4,gem,like

You can already test in your console to see how it works first: rails c user = User.first post = Post.first user.like!(post) user.likes?(post) So you can create an action: likes in your Posts controller. def likes @user = current_user # before_action :authenticate_user, only: [:likes] @post = Post.find(params[:id]) @user.like!(@post) redirect_to :back,...

Rake namespace not recognizing a local task

ruby,rake,rake-task

You have a problem in line 20: Rake::Task[myapp:runTests].invoke('--client=EXAMPLE', '--env=Staging', '--app=myappalt') The myapp:runTests is no symbol and no string. If you make it a string, then your task will run: Rake::Task['myapp:runTests'].invoke('--client=EXAMPLE', '--env=Staging', '--app=myappalt') With Rake::Task[...].invoke you don't work inside you namespace, you call a task on a global level....

Remove Tables from Schema

ruby-on-rails,database,gem,rails-migrations

Create a migration: bundle exec rails g migration remove_attachinary Then tell Rails what to do: def up drop_table :attachinary_files end Remove the change method present by default If ever you'd like this migration to be reversible, copy your previous code in a down method...