我刚为产品和购物车创建了一个简单的应用程序,其中包含名称,价格和附件。它没有任何问题,工作正常。我决定分别使用rails-admin gem和devise创建管理和身份验证。
我按照here所述的说明进行操作。这一切都很好,直到我到达rails_admin部分。除了使用github页面上描述的rails_admin 1.3版本之外,我完成了所描述的所有操作。我也在链接上尝试了旧版本,但每次都遇到此错误
PG::UndefinedTable - ERROR: relation "active_storage_attachments" does not exist LINE 8: WHERE a.attrelid = '"active_storage_attachmen...
我没有名称' active_storage_attachments'的任何表格。我在配置文件中找到了active_storage,所以我猜这可能是由Rails配置引起的。任何帮助将不胜感激。如果需要从我的应用中显示一些代码,我会这样做,虽然它已经是一个非常庞大的代码。
提前致谢。
答案 0 :(得分:11)
您是否按this page所述运行webpack: Failed to compile.
Microsoft.AspNetCore.SpaServices:Error: ERROR in ./node_modules/bootstrap/dist/css/bootstrap.min.css
Module build failed: BrowserslistError: Unknown browser major
at error (C:\Users\Anon\source\repos\WebApplication2\WebApplication2\ClientApp\node_modules\browserslist\index.js:37:11)
at Function.browserslist.checkName (C:\Users\Anon\source\repos\WebApplication2\WebApplication2\ClientApp\node_modules\browserslist\index.js:320:18)
at Function.select (C:\Users\Anon\source\repos\WebApplication2\WebApplication2\ClientApp\node_modules\browserslist\index.js:438:37)
at C:\Users\Anon\source\repos\WebApplication2\WebApplication2\ClientApp\node_modules\browserslist\index.js:207:41
at Array.forEach (<anonymous>)
at browserslist (C:\Users\Anon\source\repos\WebApplication2\WebApplication2\ClientApp\node_modules\browserslist\index.js:196:13)
at Browsers.parse (C:\Users\Anon\source\repos\WebApplication2\WebApplication2\ClientApp\node_modules\autoprefixer\lib\browsers.js:44:14)
at new Browsers (C:\Users\Anon\source\repos\WebApplication2\WebApplication2\ClientApp\node_modules\autoprefixer\lib\browsers.js:39:28)
at loadPrefixes (C:\Users\Anon\source\repos\WebApplication2\WebApplication2\ClientApp\node_modules\autoprefixer\lib\autoprefixer.js:56:18)
at plugin (C:\Users\Anon\source\repos\WebApplication2\WebApplication2\ClientApp\node_modules\autoprefixer\lib\autoprefixer.js:62:18)
at LazyResult.run (C:\Users\Anon\source\repos\WebApplication2\WebApplication2\ClientApp\node_modules\postcss-loader\node_modules\postcss\lib\lazy-result.js:277:20)
at LazyResult.asyncTick (C:\Users\Anon\source\repos\WebApplication2\WebApplication2\ClientApp\node_modules\postcss-loader\node_modules\postcss\lib\lazy-result.js:192:32)
at LazyResult.asyncTick (C:\Users\Anon\source\repos\WebApplication2\WebApplication2\ClientApp\node_modules\postcss-loader\node_modules\postcss\lib\lazy-result.js:204:22)
at LazyResult.asyncTick (C:\Users\Anon\source\repos\WebApplication2\WebApplication2\ClientApp\node_modules\postcss-loader\node_modules\postcss\lib\lazy-result.js:204:22)
at processing.Promise.then._this2.processed (C:\Users\Anon\source\repos\WebApplication2\WebApplication2\ClientApp\node_modules\postcss-loader\node_modules\postcss\lib\lazy-result.js:231:20)
at new Promise (<anonymous>)
@ multi ./src/styles.css ./node_modules/bootstrap/dist/css/bootstrap.min.css
ERROR in ./node_modules/bootstrap/dist/css/bootstrap.min.css
Module build failed: ModuleBuildError: Module build failed: BrowserslistError: Unknown browser major
at error (C:\Users\Anon\source\repos\WebApplication2\WebApplication2\ClientApp\node_modules\browserslist\index.js:37:11)
at Function.browserslist.checkName (C:\Users\Anon\source\repos\WebApplication2\WebApplication2\ClientApp\node_modules\browserslist\index.js:320:18)
at Function.select (C:\Users\Anon\source\repos\WebApplication2\WebApplication2\ClientApp\node_modules\browserslist\index.js:438:37)
at C:\Users\Anon\source\repos\WebApplication2\WebApplication2\ClientApp\node_modules\browserslist\index.js:207:41
at Array.forEach (<anonymous>)
at browserslist (C:\Users\Anon\source\repos\WebApplication2\WebApplication2\ClientApp\node_modules\browserslist\index.js:196:13)
at Browsers.parse (C:\Users\Anon\source\repos\WebApplication2\WebApplication2\ClientApp\node_modules\autoprefixer\lib\browsers.js:44:14)
at new Browsers (C:\Users\Anon\source\repos\WebApplication2\WebApplication2\ClientApp\node_modules\autoprefixer\lib\browsers.js:39:28)
at loadPrefixes (C:\Users\Anon\source\repos\WebApplication2\WebApplication2\ClientApp\node_modules\autoprefixer\lib\autoprefixer.js:56:18)
at plugin (C:\Users\Anon\source\repos\WebApplication2\WebApplication2\ClientApp\node_modules\autoprefixer\lib\autoprefixer.js:62:18)
at LazyResult.run (C:\Users\Anon\source\repos\WebApplication2\WebApplication2\ClientApp\node_modules\postcss-loader\node_modules\postcss\lib\lazy-result.js:277:20)
at LazyResult.asyncTick (C:\Users\Anon\source\repos\WebApplication2\WebApplication2\ClientApp\node_modules\postcss-loader\node_modules\postcss\lib\lazy-result.js:192:32)
at LazyResult.asyncTick (C:\Users\Anon\source\repos\WebApplication2\WebApplication2\ClientApp\node_modules\postcss-loader\node_modules\postcss\lib\lazy-result.js:204:22)
at LazyResult.asyncTick (C:\Users\Anon\source\repos\WebApplication2\WebApplication2\ClientApp\node_modules\postcss-loader\node_modules\postcss\lib\lazy-result.js:204:22)
at processing.Promise.then._this2.processed (C:\Users\Anon\source\repos\WebApplication2\WebApplication2\ClientApp\node_modules\postcss-loader\node_modules\postcss\lib\lazy-result.js:231:20)
at new Promise (<anonymous>)
at runLoaders (C:\Users\Anon\source\repos\WebApplication2\WebApplication2\ClientApp\node_modules\webpack\lib\NormalModule.js:195:19)
at C:\Users\Anon\source\repos\WebApplication2\WebApplication2\ClientApp\node_modules\loader-runner\lib\LoaderRunner.js:364:11
at C:\Users\Anon\source\repos\WebApplication2\WebApplication2\ClientApp\node_modules\loader-runner\lib\LoaderRunner.js:230:18
at context.callback (C:\Users\Anon\source\repos\WebApplication2\WebApplication2\ClientApp\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
at Promise.resolve.then.then.catch (C:\Users\Anon\source\repos\WebApplication2\WebApplication2\ClientApp\node_modules\postcss-loader\lib\index.js:189:71)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
了?我相信这个错误可能是由于您的产品附件和您提到的配置造成的。