GithubHelp home page GithubHelp logo

Comments (9)

boblmartens avatar boblmartens commented on May 22, 2024

What do you need to know? I can do some testing if I know what I should be looking for.

from backup.

yorzi avatar yorzi commented on May 22, 2024

I was trying backup on Rails3, I encountered the following errors when starting the server, not sure is the bug in backup or in bundler:

FYI.
/Users/andy/proj.workspace/youyang/ruby/1.8/gems/backup-2.3.2.pre3/lib/backup.rb:32:in join': can't convert nil into String (TypeError) from /Users/andy/proj.workspace/youyang/ruby/1.8/gems/backup-2.3.2.pre3/lib/backup.rb:32 from /Library/Ruby/Gems/1.8/gems/bundler-1.0.0.rc.1/lib/bundler/runtime.rb:64:inrequire'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.0.rc.1/lib/bundler/runtime.rb:64:in require' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.0.rc.1/lib/bundler/runtime.rb:62:ineach'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.0.rc.1/lib/bundler/runtime.rb:62:in require' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.0.rc.1/lib/bundler/runtime.rb:51:ineach'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.0.rc.1/lib/bundler/runtime.rb:51:in require' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.0.rc.1/lib/bundler.rb:109:inrequire'
from /Users/andy/proj.workspace/youyang/config/application.rb:7
from /Users/andy/proj.workspace/youyang/ruby/1.8/gems/railties-3.0.0.rc/lib/rails/commands.rb:28:in require' from /Users/andy/proj.workspace/youyang/ruby/1.8/gems/railties-3.0.0.rc/lib/rails/commands.rb:28 from /Users/andy/proj.workspace/youyang/ruby/1.8/gems/railties-3.0.0.rc/lib/rails/commands.rb:27:intap'
from /Users/andy/proj.workspace/youyang/ruby/1.8/gems/railties-3.0.0.rc/lib/rails/commands.rb:27
from script/rails:6:in `require'
from script/rails:6

from backup.

boblmartens avatar boblmartens commented on May 22, 2024

I'll try and get on this one this week and see if I can get it to happen on a clean install of Rails 3. RVM rules!

from backup.

mrrooijen avatar mrrooijen commented on May 22, 2024

RVM rules indeed! But man I gotta say I really love the UNIX adapter more than the Rails one. Cause Rails becomes a dependency, but it's a nice plug and play feature. However I actually never use it that way anymore. Always do a clean UNIX adapter install.

Hopefully new features will be out fairly soon which will enable multiple databases and storage locations at the same time. That'd really be an awesome addition!

from backup.

mrrooijen avatar mrrooijen commented on May 22, 2024

I am currently working on implementing Ruby on Rails 3 support. This is one big drama lama haha. I have to rename modules/constants because RAILS_ROOT is deprecated and I'm trying to use Rails.root. But since we declare Backup::Environment::Rails it basically overrides it.

Then the next issue occurred! Namely that the Rails constant is not being set because the rake tasks execute the Backup gem while it's already loaded, meaning that we get this: Rails # => Uninitialized Constant

To fix this I have wrapped the whole top of lib/backup.rb that should initialize in a Proc.new block so it doesn't get executed right off the bat. We will now have a new class/method we must invoke after loading the Rails environment:

Backup::System.boot!

Which loads everything basically. So also for UNIX environment, this will be added in the bin file. But this was quite a bitch to get working, but as far as I can see after I solved the issue, Backup just worked!

I'm probably pushing a rails3 branch soon so anyone that's interested can check it out. The idea is to support both Rails 2, Rails 3 and Unix in a single gem.

from backup.

mrrooijen avatar mrrooijen commented on May 22, 2024

For what would be placed in the bin file.

require 'rubygems'
require 'backup'

puts Backup::System.boot!
puts current_environment

outputs:

true
unix

So Backup::System.boot! will be used in the bin as well!

from backup.

mrrooijen avatar mrrooijen commented on May 22, 2024

Also started working on Ruby on Rails 3 generators. These have pretty much already been implemented so these will be included in the Rails3 branch.

from backup.

mrrooijen avatar mrrooijen commented on May 22, 2024

Started the rails3 branch!
http://github.com/meskyanichi/backup/commits/rails3

Added Rails 3 Generator:
d7455f6

Added Rails 3 Compatibility for Backup:
504ed21

from backup.

mrrooijen avatar mrrooijen commented on May 22, 2024

Merged into master, released gem 2.4.0 - Ruby on Rails 3 support.

Closed by 102b97d

from backup.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.