小编bod*_*tta的帖子

Heroku db:拉错误"LoadError:无法加载此类文件 - sqlite3(Sequel :: AdapterNotFound)"

我能够运行heroku db:从我的MacBook开发环境中拔出没有任何问题,但是当我在Windows 7机器上执行该命令时,我收到以下错误

C:/Program Files (x86)/Heroku/ruby-.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': LoadError: cannot load such file -- sqlite3 (Sequel::AdapterNotFound)
    from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/sequel-3.20.0/lib/sequel/adapters/sqlite.rb:1:in `<top (required)>'
    from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/sequel-3.20.0/lib/sequel/core.rb:249:in `block in tsk_require'
    from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/sequel-3.20.0/lib/sequel/core.rb:72:in `block in check_requiring_thread'
    from <internal:prelude>:10:in `synchronize'
    from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/sequel-3.20.0/lib/sequel/core.rb:69:in `check_requiring_thread'
    from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/sequel-3.20.0/lib/sequel/core.rb:249:in `tsk_require'
    from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/sequel-3.20.0/lib/sequel/database/connecting.rb:25:in `adapter_class'
    from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/sequel-3.20.0/lib/sequel/database/connecting.rb:54:in `connect'
    from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/sequel-3.20.0/lib/sequel/core.rb:119:in `connect'
    from C:/Program …
Run Code Online (Sandbox Code Playgroud)

heroku

6
推荐指数
1
解决办法
3484
查看次数

使用Picasso从URL加载到ImageView,而不在ImageView上使用白色闪存

我正在使用Square的Picasso库将URL字符串加载到ImageView中.我在一个数组或带有Timer的URL上多次调用它来更改ImageView图像.

第一次,当Picasso加载URL内容时,每次ImageView更新时,它都会闪烁白色.

在Picasso缓存内容后,ImageView会在没有闪存的情况下进行更改.

如何阻止ImageView闪烁白色?

Picasso.with(getApplicationContext()).load(currentUrl).into(img, new Callback() {
                    @Override
                    public void onSuccess() {
                        mProgress.dismiss();
                    }

                    @Override
                    public void onError() {
                        mProgress.dismiss();
                    }
                });
Run Code Online (Sandbox Code Playgroud)

android picasso

4
推荐指数
1
解决办法
2161
查看次数

Angular-Formly 自定义类型控制器在部署时失败

我正在使用 angular-formly 网站上给出的重复部分的示例。在我的 app.config 中,我正在创建一个这样的新类型:

var unique = 1;

formlyConfigProvider.setType({
  name: 'repeatSection',
  templateUrl: 'app/rawMaterial/repeatSection.html',
  controller: function($scope) {
    $scope.formOptions = {formState: $scope.formState};
    $scope.addNew = addNew;

    $scope.copyFields = copyFields;


    function copyFields(fields) {
      fields = angular.copy(fields);
      addRandomIds(fields);
      return fields;
    }

    function addNew() {
      $scope.model[$scope.options.key] = $scope.model[$scope.options.key] || [];
      var repeatsection = $scope.model[$scope.options.key];
      var lastSection = repeatsection[repeatsection.length - 1];
      var newsection = {};
      if (lastSection) {
        newsection = angular.copy(lastSection);
      }
      repeatsection.push(newsection);
    }

    function addRandomIds(fields) {
      unique++;
      angular.forEach(fields, function(field, index) {
        if (field.fieldGroup) {
          addRandomIds(field.fieldGroup); …
Run Code Online (Sandbox Code Playgroud)

html javascript heroku angularjs gruntjs

3
推荐指数
1
解决办法
496
查看次数

标签 统计

heroku ×2

android ×1

angularjs ×1

gruntjs ×1

html ×1

javascript ×1

picasso ×1